Options
All
  • Public
  • Public/Protected
  • All
Menu

Class PasswordResetService

Password reset services.

Hierarchy

Constructors

constructor

Properties

Readonly dbm

dbm: default

Methods

deleteResetRecord

  • deleteResetRecord(resetID: string): Promise<void>
  • Delete a password reset record.

    Parameters

    • resetID: string

      A password reset record's ID.

    Returns Promise<void>

getResetRecord

  • Get a password reset record.

    Parameters

    • resetID: string

      A password reset record's ID.

    Returns Promise<PasswordReset>

    The password reset record.

requestPasswordReset

  • requestPasswordReset(email: string, prune?: boolean): Promise<string>
  • Request a password reset.

    Parameters

    • email: string

      The email address associated with the user's account.

    • prune: boolean = true

      Whether or not to prune the record when the time comes.

    Returns Promise<string>

    The new password reset record's ID.

resetPassword

  • resetPassword(resetID: string, newPassword: string): Promise<boolean>
  • Reset a user's password.

    Parameters

    • resetID: string

      A password reset record's ID.

    • newPassword: string

      The user's new password.

    Returns Promise<boolean>

    Whether or not the reset was successful.

resetRecordExists

  • resetRecordExists(resetID: string): Promise<boolean>
  • Check if a password reset record exists.

    Parameters

    • resetID: string

      A password reset record's ID.

    Returns Promise<boolean>

    Whether or not the password reset record exists.

Generated using TypeDoc