From e1efb47543458817b05f4904fb7af5e7a1036ef1 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Thu, 23 Jun 2022 19:26:31 +0200 Subject: [PATCH] web/flows: statically import webauthn-related stages for safari issues Signed-off-by: Jens Langhammer --- web/src/flows/FlowExecutor.ts | 7 +++++-- .../authenticator_validate/AuthenticatorValidateStage.ts | 7 ++++++- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/web/src/flows/FlowExecutor.ts b/web/src/flows/FlowExecutor.ts index 578a275f6..48a606d80 100644 --- a/web/src/flows/FlowExecutor.ts +++ b/web/src/flows/FlowExecutor.ts @@ -34,6 +34,11 @@ import "../elements/LoadingOverlay"; import { first } from "../utils"; import "./stages/RedirectStage"; import "./stages/access_denied/AccessDeniedStage"; +// Import webauthn-related stages to prevent issues on safari +// Which is overly sensitive to allowing things only in the context of a +// user interaction +import "./stages/authenticator_validate/AuthenticatorValidateStage"; +import "./stages/authenticator_webauthn/WebAuthnAuthenticatorRegisterStage"; import "./stages/autosubmit/AutosubmitStage"; import { StageHost } from "./stages/base"; import "./stages/captcha/CaptchaStage"; @@ -341,7 +346,6 @@ export class FlowExecutor extends LitElement implements StageHost { .challenge=${this.challenge} >`; case "ak-stage-authenticator-webauthn": - await import("./stages/authenticator_webauthn/WebAuthnAuthenticatorRegisterStage"); return html``; case "ak-stage-authenticator-validate": - await import("./stages/authenticator_validate/AuthenticatorValidateStage"); return html`