startMfaEmailRegistration

client.startMfaEmailRegistration({
  accessToken: string,
  // Optional arguments
  trustDevice: boolean, (1)
  redirectUrl: string,
  action: string
})
1 If the email is already verified and you set trust_device to true, the __Host-trusted-device-id cookie is deposited in the response header and you do not need to pass trust_device in the verifyMfaEmailRegistration step.

About this command

Starts the MFA email registration flow. When started, an email is sent to the user for verification.

If the user already has a verified email as an identifier in their account, no additional verification code is sent.

If an existing email exists but is unverified, it becomes automatically verified with verifyMfaEmailRegistration.

Examples

client.startMfaEmailRegistration({
    accessToken: 'eyJ0eXAiOiJKV1QiL...',
    redirectUrl: 'https://example.com/redirect',
    action: 'stepup'
  })

Parameters

accessToken string

The authorization credential JSON Web Token (JWT) used to access the ReachFive API, less than five minutes old.

trustDevice boolean

Boolean indicating if the device should be trusted or not.

Defaults to false.

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.

action string

A string describing the action for the MFA flow.

You can value this with whatever you like. It should match the value you describe in your MFA templates.

We recommend using meaningful values like login or transaction to help better align with MFA email and SMS templates.

Response

Type: Promise<void>