Set up TOTP-based two-factor authentication for Authority users.
Overview
Authority supports Time-based One-Time Passwords (TOTP) for MFA. Users can use apps like:
Google Authenticator
Authy
1Password
Microsoft Authenticator
MFA Flow
User Setup
Step 1: Navigate to Profile
Log in to Authority
Click your profile name
Select Security Settings
Step 2: Enable MFA
Click Enable Two-Factor Authentication
Authority displays a QR code
MFA Setup
Step 3: Scan QR Code
Open your authenticator app
Tap Add Account or +
Scan the QR code
Step 4: Verify Setup
Enter the 6-digit code from your app
Click Verify
Save your backup codes in a secure location
Backup Codes
When MFA is enabled, Authority generates 10 one-time backup codes. Store these securely - they can be used if you lose access to your authenticator app.
Example backup codes:
Each code can only be used once.
Admin Configuration
Require MFA for Admins
Enforce MFA for all administrator accounts:
Require MFA for All Users
Force MFA enrollment for all users:
MFA Grace Period
Allow users time to set up MFA:
Disabling MFA
User Self-Service
Users can disable MFA from their profile if allowed:
Navigate to Security Settings
Click Disable Two-Factor Authentication
Enter current TOTP code to confirm
Admin Override
Administrators can disable MFA for users:
Go to Admin Dashboard → Users
Select the user
Click Disable MFA
This is useful when a user loses access to their authenticator.
API Integration
Check MFA Status
Response:
Require MFA in Authorization
During OAuth authorization, check if MFA is required:
Recovery
Lost Authenticator
If a user loses their phone:
Use a backup code to log in
Disable MFA
Set up MFA again with new device
Lost Backup Codes
If a user loses both authenticator and backup codes:
Admin disables MFA for the user
User logs in with password only
User sets up MFA again
User saves new backup codes
Security Considerations
Backup codes should be stored securely (password manager, safe)
Regenerate backup codes periodically
Monitor audit logs for MFA disable events
Troubleshooting
Invalid TOTP Code
Verify device time is synchronized
Ensure you're using the correct account in the authenticator
Wait for the next code cycle (30 seconds)
QR Code Won't Scan
Use the manual entry option
Enter the secret key directly into your authenticator
// After successful password authentication
if (user.mfa_enabled) {
// Show TOTP input form
showMFAPrompt();
} else if (settings.require_mfa) {
// Redirect to MFA setup
redirectToMFASetup();
}