Two-Factor Authentication

Page Purpose: Verify 2FA code for login completion.
User Context: User with 2FA enabled who entered correct password.
Next Steps: After verification → User Dashboard (role-based)

Enter Verification Code

Enter the 6-digit code from your authenticator app (e.g., Google Authenticator, Microsoft Authenticator).

Alternative Verification Methods

Can't access your authenticator app?

Use recovery code instead
Send code via SMS (if configured)
Send code via email (if configured)

Lost access to all methods?
Contact support for account recovery

Recovery Code Entry

Form Validation

Client-side validation: Server-side validation: Error messages:

Security Flow

  1. User enters email/password on login page
  2. System checks if 2FA is enabled for user
  3. User redirected to this 2FA verification page
  4. User enters code from authenticator app
  5. System validates TOTP code
  6. If valid: Complete login and create session
  7. If invalid: Show error, allow retry (up to limit)

Data Model

AspNetUsers Table Fields Used: Two-Factor Setup: Verification Tracking:

Recovery Codes

About Recovery Codes:

Security Features

User Experience Notes