From ca682c3ee44303fbc5c6adfe0059e7cd8c11eca4 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Tue, 19 Oct 2021 22:45:09 +0200 Subject: [PATCH] web/flows: fix authenticator device selection not updating closes #1645 Signed-off-by: Jens Langhammer --- .../authenticator_validate/AuthenticatorValidateStage.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/web/src/flows/stages/authenticator_validate/AuthenticatorValidateStage.ts b/web/src/flows/stages/authenticator_validate/AuthenticatorValidateStage.ts index 6afa7c6a0..985e5da53 100644 --- a/web/src/flows/stages/authenticator_validate/AuthenticatorValidateStage.ts +++ b/web/src/flows/stages/authenticator_validate/AuthenticatorValidateStage.ts @@ -1,7 +1,7 @@ import { t } from "@lingui/macro"; import { css, CSSResult, html, TemplateResult } from "lit"; -import { customElement, property } from "lit/decorators"; +import { customElement, state } from "lit/decorators"; import AKGlobal from "../../../authentik.css"; import PFButton from "@patternfly/patternfly/components/Button/button.css"; @@ -36,11 +36,12 @@ export class AuthenticatorValidateStage { flowSlug = ""; + @state() _selectedDeviceChallenge?: DeviceChallenge; - @property({ attribute: false }) set selectedDeviceChallenge(value: DeviceChallenge | undefined) { this._selectedDeviceChallenge = value; + if (!value) return; // We don't use this.submit here, as we don't want to advance the flow. // We just want to notify the backend which challenge has been selected. new FlowsApi(DEFAULT_CONFIG).flowsExecutorSolve({