1
0
mirror of https://github.com/bitwarden/browser synced 2026-02-20 11:24:07 +00:00

[PM-31731] [Defect] No error is returned when entering an invalid email + an invalid verification code (#18913)

* share i18n key for both invalid email and invalid otp submission

* claude review
This commit is contained in:
John Harrington
2026-02-18 15:08:57 -07:00
committed by GitHub
parent 263ec94124
commit f8b5e15a44
5 changed files with 22 additions and 1 deletions

View File

@@ -896,6 +896,9 @@
"invalidVerificationCode": {
"message": "Invalid verification code"
},
"invalidEmailOrVerificationCode": {
"message": "Invalid email or verification code"
},
"valueCopied": {
"message": "$VALUE$ copied",
"description": "Value has been copied to the clipboard.",

View File

@@ -35,6 +35,9 @@
"invalidVerificationCode": {
"message": "Invalid verification code."
},
"invalidEmailOrVerificationCode": {
"message": "Invalid email or verification code"
},
"masterPassRequired": {
"message": "Master password is required."
},

View File

@@ -1023,6 +1023,9 @@
"invalidVerificationCode": {
"message": "Invalid verification code"
},
"invalidEmailOrVerificationCode": {
"message": "Invalid email or verification code"
},
"continue": {
"message": "Continue"
},

View File

@@ -52,6 +52,7 @@ export class SendAuthComponent implements OnInit {
authType = AuthType;
private expiredAuthAttempts = 0;
private otpSubmitted = false;
readonly loading = signal<boolean>(false);
readonly error = signal<boolean>(false);
@@ -184,12 +185,20 @@ export class SendAuthComponent implements OnInit {
this.updatePageTitle();
} else if (emailAndOtpRequired(response.error)) {
this.enterOtp.set(true);
if (this.otpSubmitted) {
this.toastService.showToast({
variant: "error",
title: this.i18nService.t("errorOccurred"),
message: this.i18nService.t("invalidEmailOrVerificationCode"),
});
}
this.otpSubmitted = true;
this.updatePageTitle();
} else if (otpInvalid(response.error)) {
this.toastService.showToast({
variant: "error",
title: this.i18nService.t("errorOccurred"),
message: this.i18nService.t("invalidVerificationCode"),
message: this.i18nService.t("invalidEmailOrVerificationCode"),
});
} else if (passwordHashB64Required(response.error)) {
this.sendAuthType.set(AuthType.Password);

View File

@@ -7397,6 +7397,9 @@
"invalidVerificationCode": {
"message": "Invalid verification code"
},
"invalidEmailOrVerificationCode": {
"message": "Invalid email or verification code"
},
"keyConnectorDomain": {
"message": "Key Connector domain"
},