From ec950853bc4f60f050ab0c63c48b8d862dfe6cda Mon Sep 17 00:00:00 2001 From: rr-bw <102181210+rr-bw@users.noreply.github.com> Date: Fri, 29 Aug 2025 12:25:31 -0700 Subject: [PATCH] fix(2fa-recovery-code-error): [Auth/PM-19885] Better error handling when 2FA recovery code is invalid (#16145) Implements better error handling when a user enters an invalid 2FA recovery code. Upon entering an invalid code: - Keep the user on the `/recover-2fa` page (This also makes it so the incorrect code remains in the form field so the user can see what they entered, if they mistyped the code, etc.) - Show an inline error: "Invalid recovery code" --- .../auth/recover-two-factor.component.html | 1 - .../auth/recover-two-factor.component.spec.ts | 74 +++++++++++++++---- .../app/auth/recover-two-factor.component.ts | 33 +++++++-- apps/web/src/locales/en/messages.json | 3 + 4 files changed, 90 insertions(+), 21 deletions(-) diff --git a/apps/web/src/app/auth/recover-two-factor.component.html b/apps/web/src/app/auth/recover-two-factor.component.html index dee3bec1520..da2501efe26 100644 --- a/apps/web/src/app/auth/recover-two-factor.component.html +++ b/apps/web/src/app/auth/recover-two-factor.component.html @@ -28,7 +28,6 @@ {{ "recoveryCodeTitle" | i18n }} -