From 2a8a5319a246b9e94ddb0a1d9c86dfcc437b6c77 Mon Sep 17 00:00:00 2001 From: Ludeeus Date: Wed, 27 Oct 2021 07:44:47 +0000 Subject: [PATCH] Match clientID origin --- src/auth/ha-auth-flow.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/auth/ha-auth-flow.ts b/src/auth/ha-auth-flow.ts index ff0a31e0f9..4be2695a4a 100644 --- a/src/auth/ha-auth-flow.ts +++ b/src/auth/ha-auth-flow.ts @@ -174,6 +174,9 @@ class HaAuthFlow extends litLocalizeLiteMixin(LitElement) { } private _renderStep(step: DataEntryFlowStep): TemplateResult { + const clientIdOrigin = this.clientId + ? new URL(this.clientId).origin + : undefined; switch (step.type) { case "abort": return html` @@ -205,7 +208,7 @@ class HaAuthFlow extends litLocalizeLiteMixin(LitElement) { .computeError=${this._computeErrorCallback(step)} @value-changed=${this._stepDataChanged} > - ${this.clientId === window.location.origin && step.step_id !== "mfa" + ${clientIdOrigin === window.location.origin && step.step_id !== "mfa" ? html`