AccountsClientPassword
Index
Constructors
constructor
Parameters
client: AccountsClient
options: AccountsClientPasswordOptions = {}
Returns AccountsClientPassword
Methods
publicaddEmail
Parameters
newEmail: string
A new email address for the user.
Returns Promise<void>
publicchangePassword
Change the current user's password. Must be logged in.
Parameters
oldPassword: string
The user's current password.
newPassword: string
A new password for the user.
Returns Promise<void>
publiccreateUser
Create a new user.
Parameters
user: CreateUserServicePassword
Returns Promise<CreateUserResult>
publichashPassword
Utility function that will return the password hashed.
Parameters
password: string
The password to hash.
Returns string
publiclogin
Log the user in with a password.
Parameters
user: LoginUserPasswordService
Returns Promise<LoginResult>
publicrequestPasswordReset
Request a forgot password email.
Parameters
email: string
The email address to send a password reset link.
Returns Promise<void>
publicrequestVerificationEmail
Send an email with a link the user can use verify their email address.
Parameters
email: string
The email address to send the verification link.
Returns Promise<void>
publicresetPassword
Reset the password for a user using a token received in email.
Parameters
token: string
The token retrieved from the reset password URL.
newPassword: string
A new password for the user. The password is not sent in plain text.
Returns Promise<any>
publicverifyEmail
Marks the user's email address as verified using a token received in email.
Parameters
token: string
The token retrieved from the verification URL.
Returns Promise<void>
Add an email address for a user. Must be logged in.