1
0
mirror of https://github.com/bitwarden/browser.git synced 2025-01-21 21:11:35 +01:00

Bug fix - error toast in 2fa (#9623)

* Bug fix - error toast in 2fa

* Bug fix - Yubikey code obscured

* 2FA error fix
This commit is contained in:
vinith-kovan 2024-07-01 21:33:51 +05:30 committed by GitHub
parent b060c15836
commit 432a4ddd17
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 8 deletions

View File

@ -78,15 +78,15 @@ export class TwoFactorEmailComponent extends TwoFactorBaseComponent {
}
submit = async () => {
this.formGroup.markAllAsTouched();
if (this.enabled) {
await this.disableEmail();
this.onChangeStatus.emit(false);
} else {
this.formGroup.markAllAsTouched();
if (this.formGroup.invalid) {
return;
}
await this.enable();
this.onChangeStatus.emit(true);
}

View File

@ -220,14 +220,11 @@ export class TwoFactorComponent extends CaptchaProtectedComponent implements OnI
this.token = this.token.replace(" ", "").trim();
}
try {
await this.doSubmit();
} catch {
if (this.selectedProviderType === TwoFactorProviderType.WebAuthn && this.webAuthn != null) {
this.webAuthn.start();
}
}
}
async doSubmit() {
this.formPromise = this.loginStrategyService.logInTwoFactor(