feat(auth): add 2FA setup UI and login challenge step

This commit is contained in:
cesnimda
2026-07-12 21:17:09 +02:00
parent c68b49eda0
commit b85dc1ffb7
9 changed files with 702 additions and 57 deletions
+78
View File
@@ -306,6 +306,45 @@ export const translations = {
profileUpdatePassword: "Update password",
profilePasswordUpdated: "Password updated.",
profilePasswordUpdateFailed: "Failed to change password.",
twoFactorTitle: "Two-factor verification",
twoFactorHint: "Enter the 6-digit code from your authenticator app, or a recovery code.",
twoFactorCodeLabel: "Code",
twoFactorVerify: "Verify",
twoFactorVerifying: "Verifying...",
twoFactorBack: "Back",
twoFactorInvalidCode: "Invalid code. Please try again.",
twoFactorRateLimited: "Too many attempts. Please wait a few minutes and try again.",
twoFactorGenericError: "Something went wrong. Please try again.",
twoFactorSectionTitle: "Two-factor authentication",
twoFactorStatusEnabled: "Enabled since {date}",
twoFactorStatusDisabled: "Not enabled",
twoFactorEnableButton: "Enable 2FA",
twoFactorDisableButton: "Disable 2FA",
twoFactorRegenerateButton: "Regenerate recovery codes",
twoFactorPasswordPrompt: "Confirm your password to continue",
twoFactorPasswordLabel: "Current password",
twoFactorContinue: "Continue",
twoFactorWrongPassword: "Incorrect password.",
twoFactorSetupTitle: "Scan this QR code",
twoFactorSetupHint: "Scan with your authenticator app, or enter the key manually.",
twoFactorManualKeyLabel: "Manual entry key",
twoFactorCopyKey: "Copy key",
twoFactorKeyCopied: "Key copied to clipboard.",
twoFactorConfirmCodeLabel: "6-digit code",
twoFactorConfirmCodeHint: "Enter the code shown by your authenticator app to confirm setup.",
twoFactorConfirmButton: "Confirm",
twoFactorRecoveryTitle: "Save your recovery codes",
twoFactorRecoveryHint: "Each code can be used once if you lose access to your authenticator app. This is the only time these codes will be shown.",
twoFactorCopyAll: "Copy all codes",
twoFactorCodesCopied: "Recovery codes copied.",
twoFactorDownload: "Download as .txt",
twoFactorSavedConfirm: "I've saved my recovery codes",
twoFactorDone: "Done",
twoFactorDisableWarning: "Disabling 2FA will also invalidate your recovery codes.",
twoFactorRegenerateWarning: "This will invalidate your existing recovery codes.",
twoFactorEnabledSuccess: "Two-factor authentication enabled.",
twoFactorDisabledSuccess: "Two-factor authentication disabled.",
twoFactorRegenerateSuccess: "Recovery codes regenerated.",
cropDialogTitle: "Crop profile image",
cropDialogBody: "Position and zoom your image. The saved avatar will be exported as a 512×512 square.",
cropDialogZoom: "Zoom",
@@ -1284,6 +1323,45 @@ export const translations = {
profileUpdatePassword: "Oppdater passord",
profilePasswordUpdated: "Passord oppdatert.",
profilePasswordUpdateFailed: "Kunne ikke endre passord.",
twoFactorTitle: "Topunkts bekreftelse",
twoFactorHint: "Skriv inn 6-sifret kode fra autentiseringsappen din, eller en gjenopprettingskode.",
twoFactorCodeLabel: "Kode",
twoFactorVerify: "Bekreft",
twoFactorVerifying: "Bekrefter...",
twoFactorBack: "Tilbake",
twoFactorInvalidCode: "Ugyldig kode. Prøv igjen.",
twoFactorRateLimited: "For mange forsøk. Vent noen minutter og prøv igjen.",
twoFactorGenericError: "Noe gikk galt. Prøv igjen.",
twoFactorSectionTitle: "Topunkts autentisering",
twoFactorStatusEnabled: "Aktivert siden {date}",
twoFactorStatusDisabled: "Ikke aktivert",
twoFactorEnableButton: "Aktiver 2FA",
twoFactorDisableButton: "Deaktiver 2FA",
twoFactorRegenerateButton: "Generer nye gjenopprettingskoder",
twoFactorPasswordPrompt: "Bekreft passordet ditt for å fortsette",
twoFactorPasswordLabel: "Nåværende passord",
twoFactorContinue: "Fortsett",
twoFactorWrongPassword: "Feil passord.",
twoFactorSetupTitle: "Skann denne QR-koden",
twoFactorSetupHint: "Skann med autentiseringsappen din, eller skriv inn nøkkelen manuelt.",
twoFactorManualKeyLabel: "Manuell registreringsnøkkel",
twoFactorCopyKey: "Kopier nøkkel",
twoFactorKeyCopied: "Nøkkel kopiert til utklippstavlen.",
twoFactorConfirmCodeLabel: "6-sifret kode",
twoFactorConfirmCodeHint: "Skriv inn koden som vises i autentiseringsappen din for å bekrefte oppsettet.",
twoFactorConfirmButton: "Bekreft",
twoFactorRecoveryTitle: "Lagre gjenopprettingskodene dine",
twoFactorRecoveryHint: "Hver kode kan brukes én gang hvis du mister tilgang til autentiseringsappen din. Dette er eneste gang disse kodene vises.",
twoFactorCopyAll: "Kopier alle koder",
twoFactorCodesCopied: "Gjenopprettingskoder kopiert.",
twoFactorDownload: "Last ned som .txt",
twoFactorSavedConfirm: "Jeg har lagret gjenopprettingskodene mine",
twoFactorDone: "Ferdig",
twoFactorDisableWarning: "Deaktivering av 2FA vil også ugyldiggjøre gjenopprettingskodene dine.",
twoFactorRegenerateWarning: "Dette vil ugyldiggjøre eksisterende gjenopprettingskoder.",
twoFactorEnabledSuccess: "Topunkts autentisering aktivert.",
twoFactorDisabledSuccess: "Topunkts autentisering deaktivert.",
twoFactorRegenerateSuccess: "Gjenopprettingskoder generert på nytt.",
cropDialogTitle: "Beskjær profilbilde",
cropDialogBody: "Plasser og zoom bildet. Det lagrede avataren eksporteres som en kvadratisk 512×512-fil.",
cropDialogZoom: "Zoom",