Options
All
  • Public
  • Public/Protected
  • All
Menu

Module routes/reset

Index

Functions

  • checkCode(req: Request<ParamsDictionary, any, any, ParsedQs, Record<string, any>>): Promise<Responses.Empty>
  • Route used to check if a reset code is valid. Use route /reset/:id with a 'GET' request.

    Parameters

    • req: Request<ParamsDictionary, any, any, ParsedQs, Record<string, any>>

    Returns Promise<Responses.Empty>

  • createEmail(resetID: string): string
  • Returns the html body for the email with the reset code applied.

    Parameters

    • resetID: string

      The ID that validates the password reset.

    Returns string

  • getRouter(): express.Router
  • requestReset(req: Request<ParamsDictionary, any, any, ParsedQs, Record<string, any>>): Promise<Responses.Empty>
  • Handles password reset requests If the email in the 'GET' body is correct, an email with a reset link will be sent. If not returns an error. Route: /reset

    Parameters

    • req: Request<ParamsDictionary, any, any, ParsedQs, Record<string, any>>

      Request body should be of form { email: string }

    Returns Promise<Responses.Empty>

  • resetPassword(req: Request<ParamsDictionary, any, any, ParsedQs, Record<string, any>>): Promise<Responses.Key>
  • Route that will reset the password when the code and password are valid. Use route /reset/:id with a 'POST' request with body of form { password: string }

    Parameters

    • req: Request<ParamsDictionary, any, any, ParsedQs, Record<string, any>>

    Returns Promise<Responses.Key>

  • sendMail(mail: Email): Promise<SentMessageInfo>

Generated using TypeDoc