Two-Factor Authentication

@switch (step()) { @case ('init') {

Add an extra layer of security to your account with TOTP-based two-factor authentication.

Confirm your password
} @case ('qr') {

Scan this QR code with your authenticator app (e.g., Google Authenticator, Authy).

@if (qrDataUrl()) {
2FA QR Code

Or enter this secret manually: {{ secret() }}

} @else {

Enter this secret in your authenticator app: {{ secret() }}

} @if (backupCodes().length > 0) {

Backup Codes

Download these codes and keep them safe — they're shown only once, each works once, and can't be retrieved later (only regenerated).

@if (showCodes()) {
    @for (code of backupCodes(); track code) {
  • {{ code }}
  • }
}
} } @case ('verify') {

Enter the 6-digit code from your authenticator app to confirm setup.

Verification Code
} @case ('done') {
{{ successMessage() }}

To disable 2FA, confirm your password and a current 2FA code.

Password Current 6-digit code
} } @if (errorMessage()) { }