Skip to main content

Enable Email as 2FA Method

POST 

/api/auth/2fa/email/enable

Enable email as 2FA method.

Learn more about email as 2FA method here.

A security alert will be sent to the user's email if this setting is enabled and email is enabled and configured correctly.

Requirements

  • The user can authenticate using password. 2FA will not work with OAuth2. The OAuth2 provider will validate the second factor if the user enabled it for the provider.

Note: If email is enabled in your application, email is 2FA method will be enabled by default for every user that registers with a password.

Locale

A locale can be specified for this request. The email will be sent in the specified locale. You can learn more about locale in emails here.

If no locale is specified, the applications default locale will be used. You can learn more about configuring the default locale here.

Tokens

  • A valid AccessToken is required.
  • A valid StepUpToken is required. This token should match user and session contained in the AccessToken.

Request

Responses

Updated user information.