Match clientID origin

This commit is contained in:
Ludeeus 2021-10-27 07:44:47 +00:00
parent da38e6f986
commit 2a8a5319a2

View File

@ -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}
></ha-form>
${this.clientId === window.location.origin && step.step_id !== "mfa"
${clientIdOrigin === window.location.origin && step.step_id !== "mfa"
? html`
<ha-formfield
class="store-token"