Authenticator Workflow
In the Authenticator MFA flow, consumers receive a Time-Based One-Time Passcode (TOTP) through an Authenticator App (e.g., Google Authenticator, Microsoft Authenticator) installed on their mobile device. This code is entered during the second step of Multi-Factor Authentication.
MFA Time-based OTP (TOTP) Configuration
- Admin Console
- JavaScript Interface Integration
- LoginRadius Console configuration for TOTP is guided in the following document.
- LoginRadius supports popular TOTP/HOTP-based apps such as Google Authenticator, Microsoft Authenticator, Authy, LastPass, Duo, etc.
To use the LoginRadius JavaScript Interface for SMS-based MFA:
- Initialize the LoginRadius interface on your page as shown here.
- In the configuration options, add:
- twoFactorAuthentication (Required): Set to true to enable MFA
qrCodeAuthentication
(Required): Set totrue
- After login, you may offer users options to manage MFA (e.g., disable MFA if set to optional)
Google Authenticator API Implementation
Follow the steps below to implement MFA via our MFA API, which uses a mix of front-end and back-end API calls.
Note: If an API call requires an API Secret, it should be called from the back end. Otherwise, the API call can also be used on the front end.
- First Factor Authentication
- Verifying Authenticator Codes
- Resetting Authenticator MFA
Set up the initial login using one of the following MFA-enabled APIs:
- MFA Email Login API: To have a Standard Login flow requiring email and password.
- MFA UserName Login API: Use UserName and Password instead of Email and Password.
- MFA Phone Login: If your API has been configured for Phone-based Authentication, use this API to authenticate the user via phone.
After successful authentication, the response includes details for MFA, including Sms OTP status and available questions:
{
"SecondFactorAuthentication": {
"SecondFactorAuthenticationToken": "32ba53ff-XXXX-XXX-XXX-XXXXXXXXXXXX",
"QRCode": "http://chart.googleapis.com/chart?cht=XXXXXXXXXXXXX",
"ManualEntryCode": "XXXXXXXXXXXXXXXXXXXX",
"IsAuthenticatorVerified": false
},
"access_token": "00000000-0000-0000-0000-000000000000"
}
Note: The
QRCode
field provides the link to render the QR code for app scan.
Use the following APIs based on your use case:
Standard Authenticator Code Validation
- Use Case: Validate the passcode generated by the user’s Authenticator App.
- API: MFA Validate Google Auth Code OR MFA Validate Authenticator Code
- Inputs:
SecondFactorAuthenticationToken
Code
API Key
Optional MFA Validation
- Use Case: Validate Authenticator Code post-login if MFA is optional.
- API: Update MFA by Access Token
- Inputs:
Access Token
Code
API Key
Allow users or admins to reset authenticator MFA settings using these APIs:
-
Reset by Token
- API: MFA Reset Authenticator by Access Token
- Inputs:
Access Token
API Key
-
Reset by UID (Server-side)
- API: MFA Reset Authenticator by UID
- Inputs:
UID
API Key
API Secret