web/flows: fix authenticator device selection not updating

closes #1645

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer 2021-10-19 22:45:09 +02:00
parent f011e8a61a
commit ca682c3ee4
1 changed files with 3 additions and 2 deletions

View File

@ -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({