package components import "context" type TwoFactorSetupData struct { QRCodeURL string Secret string BackupCodes []string ErrorMessage string } templ TwoFactorSetup(ctx context.Context, data TwoFactorSetupData) { @LayoutWithContext("Two-Factor Authentication Setup", ctx) {

Two-Factor Authentication Setup

Enhance your account security with 2FA by setting up a verification app

if data.ErrorMessage != "" { }

1. Scan QR Code

Scan this QR code with your authenticator app

QR Code

Can't scan the QR code? Use this code instead:

{ data.Secret }

2. Verify Setup

Enter the code from your authenticator app

if len(data.BackupCodes) > 0 {

3. Save Backup Codes

Store these backup codes in a safe place

for _, code := range data.BackupCodes {
{ code }
}
}

About Two-Factor Authentication

After enabling 2FA, you'll need to enter a verification code from your authenticator app when signing in. This adds an extra layer of security to your account even if your password is compromised.

} }