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:
@@ -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.",
|
||||
|
||||
@@ -35,6 +35,9 @@
|
||||
"invalidVerificationCode": {
|
||||
"message": "Invalid verification code."
|
||||
},
|
||||
"invalidEmailOrVerificationCode": {
|
||||
"message": "Invalid email or verification code"
|
||||
},
|
||||
"masterPassRequired": {
|
||||
"message": "Master password is required."
|
||||
},
|
||||
|
||||
@@ -1023,6 +1023,9 @@
|
||||
"invalidVerificationCode": {
|
||||
"message": "Invalid verification code"
|
||||
},
|
||||
"invalidEmailOrVerificationCode": {
|
||||
"message": "Invalid email or verification code"
|
||||
},
|
||||
"continue": {
|
||||
"message": "Continue"
|
||||
},
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -7397,6 +7397,9 @@
|
||||
"invalidVerificationCode": {
|
||||
"message": "Invalid verification code"
|
||||
},
|
||||
"invalidEmailOrVerificationCode": {
|
||||
"message": "Invalid email or verification code"
|
||||
},
|
||||
"keyConnectorDomain": {
|
||||
"message": "Key Connector domain"
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user