fix(2FA): add missing translations
This commit is contained in:
1 parent
22df31e32e
commit
c127767c83
4 files changed
+16
-1
No files matched your search
@@ -483,6 +483,7 @@
|
||||
"two-factor-error-disable-not-allowed": "Two-factor authentication is required and cannot be disabled.",
|
||||
"two-factor-error-incorrect-password": "Incorrect password.",
|
||||
"two-factor-error-not-enabled": "Two-factor authentication is not enabled.",
|
||||
"two-factor-error-no-pending-setup": "No pending two-factor authentication setup found.",
|
||||
"two-factor-locked-message": "Too many failed attempts. Try again at {time}.",
|
||||
"two-factor-active-description": "Your account is protected with two-factor authentication. Each login requires a code from your authenticator app."
|
||||
}
|
||||
|
||||
@@ -481,6 +481,7 @@
|
||||
"two-factor-error-disable-not-allowed": "L’authentification à deux facteurs est obligatoire et ne peut pas être désactivée.",
|
||||
"two-factor-error-incorrect-password": "Mot de passe incorrect.",
|
||||
"two-factor-error-not-enabled": "L’authentification à deux facteurs n’est pas activée.",
|
||||
"two-factor-error-no-pending-setup": "Aucune configuration d’authentification à deux facteurs en attente n’a été trouvée.",
|
||||
"two-factor-locked-message": "Trop de tentatives infructueuses. Réessayez à {time}.",
|
||||
"two-factor-active-description": "Votre compte est protégé par l’authentification à deux facteurs. Chaque connexion nécessite un code provenant de votre application d’authentification."
|
||||
}
|
||||
|
||||
@@ -24,7 +24,10 @@ export async function POST(request: Request) {
|
||||
|
||||
// Verify if 2FA is waiting for setup
|
||||
if (!twoFactor || twoFactor.isEnabled) {
|
||||
return badRequest({ message: 'No pending 2FA setup found' });
|
||||
return badRequest({
|
||||
code: 'two-factor-error-no-pending-setup',
|
||||
message: 'No pending 2FA setup found',
|
||||
});
|
||||
}
|
||||
|
||||
// Verify rate limit
|
||||
|
||||
@@ -476,4 +476,14 @@ export const messages: Record<string, string> = {
|
||||
twoFactorUserDescription: 'message.two-factor-user-description',
|
||||
twoFactorLockedMessage: 'message.two-factor-locked-message',
|
||||
twoFactorActiveDescription: 'message.two-factor-active-description',
|
||||
twoFactorErrorInvalidCode: 'message.two-factor-error-invalid-code',
|
||||
twoFactorErrorMissingToken: 'message.two-factor-error-missing-token',
|
||||
twoFactorErrorInvalidPartialToken: 'message.two-factor-error-invalid-partial-token',
|
||||
twoFactorErrorInvalidBackupCode: 'message.two-factor-error-invalid-backup-code',
|
||||
twoFactorErrorCodeUsed: 'message.two-factor-error-code-used',
|
||||
twoFactorErrorTooManyAttempts: 'message.two-factor-error-too-many-attempts',
|
||||
twoFactorErrorDisableNotAllowed: 'message.two-factor-error-disable-not-allowed',
|
||||
twoFactorErrorIncorrectPassword: 'message.two-factor-error-incorrect-password',
|
||||
twoFactorErrorNotEnabled: 'message.two-factor-error-not-enabled',
|
||||
twoFactorErrorNoPendingSetup: 'message.two-factor-error-no-pending-setup',
|
||||
};
|
||||
Reference in new issue
Block a user