mirror of
https://github.com/bitwarden/browser.git
synced 2024-09-27 04:03:00 +02:00
Fix logic in iframe based auth
This commit is contained in:
parent
e51f82ed78
commit
cc35361aca
@ -155,7 +155,7 @@ export class TwoFactorComponent extends BaseTwoFactorComponent {
|
||||
}
|
||||
|
||||
async submit() {
|
||||
if (this.selectedProviderType === TwoFactorProviderType.WebAuthn) {
|
||||
if (this.selectedProviderType === TwoFactorProviderType.WebAuthn && !this.useIframeWebAuthn) {
|
||||
await this.authWebAuthn();
|
||||
} else {
|
||||
await this.submit_final();
|
||||
|
@ -26,7 +26,6 @@ import { TokenTwoFactorRequest } from "@bitwarden/common/auth/models/request/ide
|
||||
import { TwoFactorEmailRequest } from "@bitwarden/common/auth/models/request/two-factor-email.request";
|
||||
import { TwoFactorProviders } from "@bitwarden/common/auth/services/two-factor.service";
|
||||
import { WebAuthnIFrame } from "@bitwarden/common/auth/webauthn-iframe";
|
||||
import { ClientType } from "@bitwarden/common/enums";
|
||||
import { AppIdService } from "@bitwarden/common/platform/abstractions/app-id.service";
|
||||
import { ConfigService } from "@bitwarden/common/platform/abstractions/config/config.service";
|
||||
import { EnvironmentService } from "@bitwarden/common/platform/abstractions/environment.service";
|
||||
@ -49,7 +48,6 @@ export class TwoFactorComponent extends CaptchaProtectedComponent implements OnI
|
||||
webAuthnSupported = false;
|
||||
useIframeWebAuthn = true;
|
||||
webAuthn: WebAuthnIFrame = null;
|
||||
|
||||
title = "";
|
||||
twoFactorEmail: string = null;
|
||||
formPromise: Promise<any>;
|
||||
@ -249,7 +247,7 @@ export class TwoFactorComponent extends CaptchaProtectedComponent implements OnI
|
||||
if (this.selectedProviderType === TwoFactorProviderType.WebAuthn) {
|
||||
if (this.webAuthn != null) {
|
||||
this.webAuthn.stop();
|
||||
} else if ((await this.platformUtilsService.getClientType()) !== ClientType.Desktop) {
|
||||
} else if (this.useIframeWebAuthn) {
|
||||
return;
|
||||
}
|
||||
} else if (
|
||||
|
Loading…
Reference in New Issue
Block a user