Skip to main content

Email Authenticator

In the email authenticator flow, consumers receive the OTP on their registered email in the profile, which they consume at the second step of MFA.

Flow Diagram:

MFA-by-email-authenticator

MFA Email Authenticator Configuration

  • LoginRadius Console configuration for Email Authenticatior is guided in the following document.

API-Based Implementation

Step-by-Step API Workflow

Note: Use server-side implementation for API calls requiring your API Secret.

Handle the login response:

"SecondFactorAuthentication": {
"SecondFactorAuthenticationToken": "xxxx-xxxx",
"IsEmailOtpAuthenticatorVerified": false,
"Email": ["xyz@example.com"],
"EmailOTPStatus": { "Email": "xyz@example.com" }
}

  • Email: List of registered emails.
    • IsEmailOtpAuthenticatorVerified: true if already enabled.
    • EmailOTPStatus: Status of OTP dispatch.
  1. Trigger Email OTP (if not verified): Using Send MFA Email OTP by MFA Token API.

  2. Verify Email OTP: Using Verify MFA Email OTP by MFA Token API with the OTP and MFA token.

  3. (Optional MFA) Set up post-login: Using Verify Email OTP by Access Token API.

  4. Resend Email OTP post-login: Send the MFA Email OTP using the Access Token.

  5. Reset MFA Email OTP Settings:

Sample Email Template

Use the following format for the verification email:

json
{
"Type": "secondfactorauthentication",
"Subject": "Verification Email",
"Content": "Hi #Name#, <br/><br/>Your 2FA login verification code is <b>#OTP#</b><br/><br/>Regards,<br/>"
}

  • Type: SECONDFACTORAUTHENTICATION = 16
  • Merge fields:
    • #Name# – Consumer's name
    • #OTP# – Verification code