From 05e3d8db83ac7fd5bb6b5465738f360517e884c8 Mon Sep 17 00:00:00 2001
From: Jens L
Date: Mon, 15 Apr 2024 19:11:32 +0200
Subject: [PATCH] web/flows: fix passwordless hidden without input (#9273)
---
.../identification/IdentificationStage.ts | 34 +++++++++++--------
1 file changed, 19 insertions(+), 15 deletions(-)
diff --git a/web/src/flow/stages/identification/IdentificationStage.ts b/web/src/flow/stages/identification/IdentificationStage.ts
index 0928f1d4e7..c081cb3166 100644
--- a/web/src/flow/stages/identification/IdentificationStage.ts
+++ b/web/src/flow/stages/identification/IdentificationStage.ts
@@ -194,14 +194,14 @@ export class IdentificationStage extends BaseStage<
${msg("Need an account?")}
${msg("Sign up.")}
`
- : html``}
+ : nothing}
${this.challenge.recoveryUrl
? html`
${msg("Forgot username or password?")}
`
- : html``}
+ : nothing}
`;
}
@@ -265,26 +265,18 @@ export class IdentificationStage extends BaseStage<
/>
`
- : html``}
+ : nothing}
${"non_field_errors" in (this.challenge?.responseErrors || {})
? this.renderNonFieldErrors(this.challenge?.responseErrors?.non_field_errors || [])
- : html``}
+ : nothing}
${this.challenge.passwordlessUrl
- ? html`${msg("Or")}
- `
- : html``}`;
+ ? html`${msg("Or")}`
+ : nothing}`;
}
render(): TemplateResult {
@@ -306,8 +298,20 @@ export class IdentificationStage extends BaseStage<
? html`
${msg(str`Login to continue to ${this.challenge.applicationPre}.`)}
`
- : html``}
+ : nothing}
${this.renderInput()}
+ ${this.challenge.passwordlessUrl
+ ? html`
+
+ `
+ : nothing}