Multi-Factor Authentication (MFA)
BastionAuth supports Time-based One-Time Passwords (TOTP) as a second factor for authentication.
Enabling MFA
Users can enable MFA from their account settings. The flow involves:
- Requesting a TOTP secret and QR code
- Scanning the QR code with an authenticator app (Google Authenticator, Authy, etc.)
- Verifying a code to confirm setup
- Saving backup codes
Backup Codes
When MFA is enabled, 10 single-use backup codes are generated. These can be used if the user loses access to their authenticator device.
API Reference
See the API Reference for MFA endpoints:
POST /auth/mfa/enablePOST /auth/mfa/verifyPOST /auth/mfa/validate