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:
parent
b060c15836
commit
432a4ddd17
@ -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);
|
||||
}
|
||||
|
@ -220,12 +220,9 @@ 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();
|
||||
}
|
||||
await this.doSubmit();
|
||||
if (this.selectedProviderType === TwoFactorProviderType.WebAuthn && this.webAuthn != null) {
|
||||
this.webAuthn.start();
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user