fix(2FA): add missing translations

This commit is contained in:
Rudy B. committed 2026-04-25 11:38:54 +02:00
1 parent 22df31e32e
commit c127767c83
4 files changed
+16 -1

No files matched your search

+4 -1
View File
@@ -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
+10
View File
@@ -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',
};