QR code to be verified by authenticator app
- Pre enroll MFA using Authenticator App
Authentication and Identity Management
Frontegg offers a comprehensive suite of authentication, user management, and security features to streamline identity management and enhance application security. This section provides an overview of all relevant API endpoints, organized into Authentication, Management, and Self-Service categories.
Authentication Endpoints: Enable secure user login, multi-factor authentication (MFA), passwordless options, and social login integrations, allowing for a flexible and robust sign-in experience.
Management Endpoints: Require environment-level authorization and provide full control over SSO (SAML and OpenID Connect) resources, user roles, permissions, and configurations. These endpoints are designed for administrative use, allowing for centralized identity and access management.
Self-Service Endpoints: Accessible with a user token (JWT), these endpoints empower users to manage their SSO connections and other account settings. Users with the necessary permissions can create, update, or delete SSO configurations directly, ensuring they have the tools to manage their access securely and independently.
Each category in this section helps you configure and extend Frontegg’s capabilities, providing the flexibility to manage user identities, authentication protocols, and access controls as per your application’s needs.
Request
Verify a multi-factor authentication (MFA) challenge using a code sent to the user's email address.
This endpoint finalizes the email-based MFA verification and completes the authentication process.
The request must include:
otcToken: One-time challenge token received during the email MFA initiation.code: The MFA code sent to the user's email.mfaToken: Token returned from the original MFA setup or step-up authentication request.rememberDevice(optional): If set totrue, the device will be remembered to reduce MFA prompts on future logins from the same client.
Use this endpoint to confirm the MFA challenge and optionally remember the current device for future sessions.
- EU Regionhttps://api.frontegg.com/identity/resources/auth/v1/user/mfa/emailcode/verify
- US Regionhttps://api.us.frontegg.com/identity/resources/auth/v1/user/mfa/emailcode/verify
- CA Regionhttps://api.ca.frontegg.com/identity/resources/auth/v1/user/mfa/emailcode/verify
- AU Regionhttps://api.au.frontegg.com/identity/resources/auth/v1/user/mfa/emailcode/verify
- Frontegg sub-domain for use with user tokenshttps://app-xxx.frontegg.com/identity/resources/auth/v1/user/mfa/emailcode/verify
- cURL
- JavaScript
- Python
- GO
- Payload
curl -i -X POST \
https://api.frontegg.com/identity/resources/auth/v1/user/mfa/emailcode/verify \
-H 'Authorization: Bearer <YOUR_JWT_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"otcToken": "string",
"code": "string",
"mfaToken": "string",
"rememberDevice": true
}'{ "tokenType": "bearer", "otcToken": "string", "mfaRequired": true, "mfaToken": "string", "resetPasswordToken": "string", "passwordExpiresIn": 0, "notificationPeriod": 0, "mfaEnrolled": true, "mfaDevices": { "webauthn": [ … ], "phones": [ … ], "authenticators": [ … ], "emails": [ … ] }, "mfaStrategies": {}, "qrCode": "string", "recoveryCode": "string", "accessToken": "string", "refreshToken": "string", "expiresIn": 0, "expires": "string", "userId": "string", "userEmail": "string", "emailVerified": true, "isBreachedPassword": true }
Request
Initiate enrollment in multi-factor authentication (MFA) using an authenticator app (e.g., Google Authenticator, Authy).
This endpoint begins the MFA setup process and returns the necessary data for configuring an authenticator app, such as a QR code or secret key.
The request must include:
mfaToken: A token received from the initial authentication flow that authorizes the MFA setup.
Use this endpoint to generate the configuration required for linking an authenticator app before completing verification.
- EU Regionhttps://api.frontegg.com/identity/resources/auth/v1/user/mfa/authenticator/enroll
- US Regionhttps://api.us.frontegg.com/identity/resources/auth/v1/user/mfa/authenticator/enroll
- CA Regionhttps://api.ca.frontegg.com/identity/resources/auth/v1/user/mfa/authenticator/enroll
- AU Regionhttps://api.au.frontegg.com/identity/resources/auth/v1/user/mfa/authenticator/enroll
- Frontegg sub-domain for use with user tokenshttps://app-xxx.frontegg.com/identity/resources/auth/v1/user/mfa/authenticator/enroll
- cURL
- JavaScript
- Python
- GO
- Payload
curl -i -X POST \
https://api.frontegg.com/identity/resources/auth/v1/user/mfa/authenticator/enroll \
-H 'Authorization: Bearer <YOUR_JWT_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"mfaToken": "string"
}'Request
Complete enrollment in multi-factor authentication (MFA) using an authenticator app.
This endpoint verifies the MFA setup by validating the time-based one-time password (TOTP) generated by the authenticator app.
The request must include:
token: The 6-digit TOTP code generated by the authenticator app.mfaToken: Token from the initial MFA enrollment initiation.rememberDevice(optional): If set totrue, the device will be remembered and may skip MFA on future logins from the same browser or device.
Use this endpoint to finalize MFA enrollment and activate the authenticator app for the user's account.
- EU Regionhttps://api.frontegg.com/identity/resources/auth/v1/user/mfa/authenticator/enroll/verify
- US Regionhttps://api.us.frontegg.com/identity/resources/auth/v1/user/mfa/authenticator/enroll/verify
- CA Regionhttps://api.ca.frontegg.com/identity/resources/auth/v1/user/mfa/authenticator/enroll/verify
- AU Regionhttps://api.au.frontegg.com/identity/resources/auth/v1/user/mfa/authenticator/enroll/verify
- Frontegg sub-domain for use with user tokenshttps://app-xxx.frontegg.com/identity/resources/auth/v1/user/mfa/authenticator/enroll/verify
- cURL
- JavaScript
- Python
- GO
- Payload
curl -i -X POST \
https://api.frontegg.com/identity/resources/auth/v1/user/mfa/authenticator/enroll/verify \
-H 'Authorization: Bearer <YOUR_JWT_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"token": "string",
"mfaToken": "string",
"rememberDevice": true
}'{ "tokenType": "bearer", "otcToken": "string", "mfaRequired": true, "mfaToken": "string", "resetPasswordToken": "string", "passwordExpiresIn": 0, "notificationPeriod": 0, "mfaEnrolled": true, "mfaDevices": { "webauthn": [ … ], "phones": [ … ], "authenticators": [ … ], "emails": [ … ] }, "mfaStrategies": {}, "qrCode": "string", "recoveryCode": "string", "accessToken": "string", "refreshToken": "string", "expiresIn": 0, "expires": "string", "userId": "string", "userEmail": "string", "emailVerified": true, "isBreachedPassword": true }