1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-18 01:03:35 +00:00

[PM-2135] feat: allow user verification to show invalid password error

This commit is contained in:
Andreas Coroiu
2023-05-05 14:30:41 +02:00
parent 1b6722feee
commit f69b42a622
6 changed files with 45 additions and 14 deletions

View File

@@ -22,6 +22,8 @@ export class UserVerificationPromptComponent {
secret: this.formBuilder.control<Verification | null>(null),
});
protected invalidSecret = false;
constructor(
private modalRef: ModalRef,
protected config: ModalConfig,
@@ -45,7 +47,9 @@ export class UserVerificationPromptComponent {
try {
//Incorrect secret will throw an invalid password error.
await this.userVerificationService.verifyUser(this.secret.value);
this.invalidSecret = false;
} catch (e) {
this.invalidSecret = true;
this.platformUtilsService.showToast(
"error",
this.i18nService.t("error"),