Fix #721: mismatched LoginPasskeysConditionalAuthenticate

This commit is contained in:
Jason Huang 2024-11-18 13:59:44 +08:00
parent 232be50225
commit 8fe74fe7ee
No known key found for this signature in database
GPG Key ID: 38D603A5FC871630

View File

@ -115,11 +115,13 @@ export default function LoginPasskeysConditionalAuthenticate(
</div>
</>
)}
</>
)}
<div id="kc-form">
<div id="kc-form-wrapper">
{realm.password && (
<form
id="kc-form-passkey"
id="kc-form-login"
action={url.loginAction}
method="post"
style={{ display: "none" }}
@ -144,10 +146,9 @@ export default function LoginPasskeysConditionalAuthenticate(
className={kcClsx("kcInputClass")}
name="username"
defaultValue={login.username ?? ""}
//autoComplete="username webauthn"
autoComplete="username webauthn"
type="text"
autoFocus
autoComplete="off"
/>
{messagesPerField.existsError("username") && (
<span id="input-error-username" className={kcClsx("kcInputErrorMessageClass")} aria-live="polite">
@ -169,8 +170,6 @@ export default function LoginPasskeysConditionalAuthenticate(
</div>
</div>
</div>
</>
)}
</div>
</Template>
);