[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
pull/19071/merge
John Harrington 20 hours ago committed by GitHub
parent 263ec94124
commit f8b5e15a44
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -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"
},

Loading…
Cancel
Save