Dashboard Setup
MFA enrollment requires users to register a TOTP device or Passkey. Configure it in the dashboard before implementing in your application. See End-User MFA - Enrollment for dashboard setup instructions.
Your UI SDK Implementation
-
Add device: Call
client.mfa.addDevice(MFADeviceType.Totp) → show secret for manual entry.
- Verify:
client.mfa.verifyDevice(code, MFADeviceType.Totp) completes setup.
- Manage devices:
client.mfa.getUserDevices() lists devices.
- Recovery codes:
client.mfa.getRecoveryCodes(true) regenerates backup codes.
Only one verified TOTP device per user
- Recovery codes are single-use. Regenerate with
client.mfa.getRecoveryCodes(true) if needed.
Troubleshooting
- Error: “401 Unauthorized” when adding a second TOTP device — only one device is supported; delete the existing device first.
- Recovery codes not working — each code is single-use; generate new codes if exhausted.
-
Register or authenticate: If no passkeys →
client.passkeys.register(), else client.passkeys.authenticateMFA().
- Manage:
client.passkeys.get() lists passkeys.
- Recovery: After success,
client.mfa.getRecoveryCodes() → show → client.mfa.completeAcknowledgement().
- Refresh: Call
client.passkeys.get() after registration/authentication.
- Passkeys require platform setup. See the React Native Passkey Setup guide.
- Recovery codes are single-use. Regenerate with
client.mfa.getRecoveryCodes(true) if needed.
Troubleshooting
- Error: “Passkey not supported” — verify platform setup and passkey support.
- Recovery codes not working — each recovery code is single-use; generate new codes if exhausted.
Dynamic UI Implementation
The React Native SDK provides a UI method to prompt MFA authentication. Use client.ui.mfa.show() to open the MFA authentication flow.
Note: The Dynamic UI is method-agnostic. It automatically prompts with whichever MFA method(s) you have enabled (TOTP only for React Native), so separate TOTP/Passkey tabs are not required here.
Optional: Create MFA token
You can optionally request an MFA token by passing createMfaToken: true:
Programmatic MFA Modal Controls
Dynamic SDKs provide granular control over individual MFA modal screens. These methods allow you to programmatically show and hide specific MFA screens in your application.
Available Modal Controls
Show and hide specific MFA screens:
Last modified on February 25, 2026