Repository navigation
Unable to render Passkey button on the primary login page when using custom authentication forms #53094
marcaparbu
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while 8000 loading. Please reload this page.
Hi,
We are currently developing a custom authentication form in Keycloak to support Passkeys (WebAuthn), but we have run into a significant UX limitation regarding how the authentication prompt is rendered. Specifically, we are unable to display or trigger the Passkey button directly on Keycloak's primary login page (
login.ftl) when using a custom form. Instead, Keycloak forces the custom authenticator through an intermediate screen or hides it behind the "Try another way" (select-authenticator.ftl) flow. This creates an awkward two-step experience for end users, requiring them to click a button on the initial page, load a second Keycloak screen, and click again just to launch the browser's native biometric prompt (navigator.credentials.get()).Ideally, Keycloak should provide a native way for custom authenticators or custom forms to declare that their Passkey trigger should be exposed directly on the primary login screen alongside standard options. This could be achieved by extending the Authenticator SPI with a capability flag or providing a flow setting that allows custom alternative authenticators to render their WebAuthn trigger on page 1, avoiding intermediate template redirects and fragile JavaScript auto-submit hacks.
We are curious to know if anyone else in the community has encountered this exact limitation when working with custom forms and Passkeys in Keycloak. If you ran into this issue, how did you handle or work around it to maintain a seamless single-click user experience? We would really appreciate any insights, recommended patterns, or advice on how others have tackled this problem.
Thanks
Best regards,
Marc
All reactions