mirror of
https://github.com/bitwarden/browser
synced 2025-12-11 13:53:34 +00: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:
@@ -78,15 +78,15 @@ export class TwoFactorEmailComponent extends TwoFactorBaseComponent {
|
|||||||
}
|
}
|
||||||
|
|
||||||
submit = async () => {
|
submit = async () => {
|
||||||
|
this.formGroup.markAllAsTouched();
|
||||||
|
|
||||||
if (this.enabled) {
|
if (this.enabled) {
|
||||||
await this.disableEmail();
|
await this.disableEmail();
|
||||||
this.onChangeStatus.emit(false);
|
this.onChangeStatus.emit(false);
|
||||||
} else {
|
} else {
|
||||||
this.formGroup.markAllAsTouched();
|
|
||||||
if (this.formGroup.invalid) {
|
if (this.formGroup.invalid) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
await this.enable();
|
await this.enable();
|
||||||
this.onChangeStatus.emit(true);
|
this.onChangeStatus.emit(true);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -220,14 +220,11 @@ export class TwoFactorComponent extends CaptchaProtectedComponent implements OnI
|
|||||||
this.token = this.token.replace(" ", "").trim();
|
this.token = this.token.replace(" ", "").trim();
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
|
||||||
await this.doSubmit();
|
await this.doSubmit();
|
||||||
} catch {
|
|
||||||
if (this.selectedProviderType === TwoFactorProviderType.WebAuthn && this.webAuthn != null) {
|
if (this.selectedProviderType === TwoFactorProviderType.WebAuthn && this.webAuthn != null) {
|
||||||
this.webAuthn.start();
|
this.webAuthn.start();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
async doSubmit() {
|
async doSubmit() {
|
||||||
this.formPromise = this.loginStrategyService.logInTwoFactor(
|
this.formPromise = this.loginStrategyService.logInTwoFactor(
|
||||||
|
|||||||
Reference in New Issue
Block a user