requestPasswordReset

// Request password reset with email
client.requestPasswordReset({
  email: string,
  // Optional arguments
  redirectUrl: string,
  returnToAfterPasswordReset: string,
  loginLink: string,
})

// Request password reset with phone number
client.requestPasswordReset({
  phoneNumber: string
})

About this command

Request a password reset for the given email or phone number. On success, an email or an SMS with a reset token is sent to the user.

Examples

  • With an email

  • With a phone number

client.requestPasswordReset({
  email: 'john.doe@example.com',
  redirectUrl: 'https://example-password-reset.com'
})
client.requestPasswordReset({
    phoneNumber: '+33682234940'
})

Parameters

email string

The user’s email address.

loginLink string

The login URL the user will be redirected to after requesting password reset. This attribute can be used in a user interface.

phoneNumber string

The user’s phone number.

Both the international format and the national conventions of the account’s country are accepted if configured in account settings.

redirectUrl string

The URL sent in the email to which the user is redirected. This URL must be whitelisted in the Allowed Callback URLs field of your ReachFive client settings.

returnToAfterPasswordReset string

Returned in the redirectUrl as a query parameter, this parameter is used to redirect users to a specific URL after a password reset.

Response

Type: Promise[void]

Feedback