Support Passkey Sign-In Using Email (Account Hinting) #2346

Open
opened 2026-03-13 09:45:37 -05:00 by GiteaMirror · 5 comments
Owner

Originally created by @slaymed on GitHub (Nov 21, 2025).

Is this suited for github?

  • Yes, this is suited for github

Currently, the passkey sign-in flow does not accept an email or any account identifier. Because of this, when a device contains multiple passkeys—each belonging to different accounts—the browser prompts the user to select which passkey to use. This breaks the UX for applications that already collect the user’s email before initiating the WebAuthn request.

I have a sign-in form that only asks for an email. When the user enters their email and presses “Continue,” I want to trigger passkey sign-in directly for that specific account, without showing the account selection UI. Since the platform doesn’t receive any hint or identifier, it cannot target the correct passkey even though the user already provided their email.

Describe the solution you'd like

Please add support for passing an email (or any account identifier) to the passkey sign-in function. This would allow the library to perform WebAuthn with an account hint, enabling the browser to skip the account-selection step and directly invoke the correct passkey.

This feature is important for apps that use an email-first login flow and want a seamless passkey experience.

Describe alternatives you've considered

Currently, the only alternative is to rely on the browser’s account selection prompt when multiple passkeys exist on a device. This works but results in a poor user experience, especially for email-first login flows, because the user has already provided their email. Another workaround is to maintain a separate mapping of device passkeys to accounts in the backend, but this adds complexity and still cannot fully skip the browser prompt in all cases.

Additional context

WebAuthn supports an “account hint” parameter (often called userHandle or id) in the credential request options, which allows the authenticator to select the correct passkey automatically. Many modern browsers implement this, but without exposing a way to pass the email/account to the library, applications cannot take advantage of it. Adding this feature would make email-first login flows seamless and improve UX when multiple passkeys exist on the same device.

Originally created by @slaymed on GitHub (Nov 21, 2025). ### Is this suited for github? - [x] Yes, this is suited for github ### Is your feature request related to a problem? Please describe. Currently, the passkey sign-in flow does not accept an email or any account identifier. Because of this, when a device contains multiple passkeys—each belonging to different accounts—the browser prompts the user to select which passkey to use. This breaks the UX for applications that already collect the user’s email before initiating the WebAuthn request. I have a sign-in form that only asks for an email. When the user enters their email and presses “Continue,” I want to trigger passkey sign-in directly for that specific account, without showing the account selection UI. Since the platform doesn’t receive any hint or identifier, it cannot target the correct passkey even though the user already provided their email. ### Describe the solution you'd like Please add support for passing an email (or any account identifier) to the passkey sign-in function. This would allow the library to perform WebAuthn with an account hint, enabling the browser to skip the account-selection step and directly invoke the correct passkey. This feature is important for apps that use an email-first login flow and want a seamless passkey experience. ### Describe alternatives you've considered Currently, the only alternative is to rely on the browser’s account selection prompt when multiple passkeys exist on a device. This works but results in a poor user experience, especially for email-first login flows, because the user has already provided their email. Another workaround is to maintain a separate mapping of device passkeys to accounts in the backend, but this adds complexity and still cannot fully skip the browser prompt in all cases. ### Additional context WebAuthn supports an “account hint” parameter (often called userHandle or id) in the credential request options, which allows the authenticator to select the correct passkey automatically. Many modern browsers implement this, but without exposing a way to pass the email/account to the library, applications cannot take advantage of it. Adding this feature would make email-first login flows seamless and improve UX when multiple passkeys exist on the same device.
GiteaMirror added the enhancement label 2026-03-13 09:45:37 -05:00
Author
Owner

@better-auth-agent[bot] commented on GitHub (Nov 21, 2025):

(tag @better-auth-agent if you would like an answer from the Agent)

DiagramDiscordGitHub

Diagram Join Star

@better-auth-agent[bot] commented on GitHub (Nov 21, 2025): (tag @better-auth-agent if you would like an answer from the Agent) <!-- bot:webhook reply v1 --> [Diagram](https://repodiagrams.s3.eu-north-1.amazonaws.com/better-auth_ultra_detailed_interactive.html) • [Discord](https://discord.gg/better-auth) • [GitHub](https://github.com/better-auth/better-auth) [![Diagram](https://img.shields.io/badge/Diagram-2b3137?style=flat-square)](https://repodiagrams.s3.eu-north-1.amazonaws.com/better-auth_ultra_detailed_interactive.html) [![Join](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&style=flat-square)](https://discord.gg/better-auth) [![Star](https://img.shields.io/badge/star-181717?logo=github&logoColor=white&style=flat-square)](https://github.com/better-auth/better-auth)
Author
Owner

@slaymed commented on GitHub (Nov 21, 2025):

@better-auth-agent Could you please check this issue?

@slaymed commented on GitHub (Nov 21, 2025): @better-auth-agent Could you please check this issue?
Author
Owner

@better-auth-agent[bot] commented on GitHub (Nov 21, 2025):

Hi there, thanks for your detailed issue submission on adding an email/account hint to the passkey sign-in flow. We understand that in email-first login flows, being able to pass an account identifier (e.g., an email) to directly target the correct passkey is important to skip the browser’s default account selection, which can break the user experience.

At the moment, our passkey implementation focuses on a standard registration and sign-in flow without input for an account hint. We recognize that WebAuthn supports user hints (sometimes via userHandle or similar parameters), and your request aligns with that approach. Our team is looking into possible solutions to include an option in the passkey sign-in method to accept such an identifier. This would enable bypassing the account selection prompt when a user’s email is already provided. Until we have a complete solution, the recommended workaround is to maintain a mapping on the backend linking passkeys to emails, although we understand this adds complexity.

Would you like to share additional use cases or provide feedback on any interim workaround ideas? Tag @better-auth-agent if you would like an answer from the Agent.

DiagramDiscordGitHub

Diagram Join Star

@better-auth-agent[bot] commented on GitHub (Nov 21, 2025): Hi there, thanks for your detailed issue submission on adding an email/account hint to the passkey sign-in flow. We understand that in email-first login flows, being able to pass an account identifier (e.g., an email) to directly target the correct passkey is important to skip the browser’s default account selection, which can break the user experience. At the moment, our passkey implementation focuses on a standard registration and sign-in flow without input for an account hint. We recognize that WebAuthn supports user hints (sometimes via userHandle or similar parameters), and your request aligns with that approach. Our team is looking into possible solutions to include an option in the passkey sign-in method to accept such an identifier. This would enable bypassing the account selection prompt when a user’s email is already provided. Until we have a complete solution, the recommended workaround is to maintain a mapping on the backend linking passkeys to emails, although we understand this adds complexity. Would you like to share additional use cases or provide feedback on any interim workaround ideas? Tag @better-auth-agent if you would like an answer from the Agent. <!-- bot:webhook reply v1 --> [Diagram](https://repodiagrams.s3.eu-north-1.amazonaws.com/better-auth_ultra_detailed_interactive.html) • [Discord](https://discord.gg/better-auth) • [GitHub](https://github.com/better-auth/better-auth) [![Diagram](https://img.shields.io/badge/Diagram-2b3137?style=flat-square)](https://repodiagrams.s3.eu-north-1.amazonaws.com/better-auth_ultra_detailed_interactive.html) [![Join](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&style=flat-square)](https://discord.gg/better-auth) [![Star](https://img.shields.io/badge/star-181717?logo=github&logoColor=white&style=flat-square)](https://github.com/better-auth/better-auth)
Author
Owner

@dosubot[bot] commented on GitHub (Feb 20, 2026):

Hi, @slaymed. I'm Dosu, and I'm helping the better-auth team manage their backlog and am marking this issue as stale.

Issue Summary:

  • You requested support for passing an email or account identifier to the passkey sign-in function to enable account hinting in WebAuthn.
  • This feature aims to improve user experience by bypassing the browser's account selection prompt.
  • The maintainer acknowledged the importance of this feature and confirmed the current implementation lacks this input.
  • They are exploring solutions to add this option and suggested a backend mapping workaround as a temporary measure.
  • No resolution has been reached yet.

Next Steps:

  • Please let me know if this issue is still relevant to the latest version of better-auth by commenting here to keep the discussion open.
  • Otherwise, this issue will be automatically closed in 7 days.

Thank you for your understanding and contribution!

@dosubot[bot] commented on GitHub (Feb 20, 2026): Hi, @slaymed. I'm [Dosu](https://dosu.dev), and I'm helping the better-auth team manage their backlog and am marking this issue as stale. **Issue Summary:** - You requested support for passing an email or account identifier to the passkey sign-in function to enable account hinting in WebAuthn. - This feature aims to improve user experience by bypassing the browser's account selection prompt. - The maintainer acknowledged the importance of this feature and confirmed the current implementation lacks this input. - They are exploring solutions to add this option and suggested a backend mapping workaround as a temporary measure. - No resolution has been reached yet. **Next Steps:** - Please let me know if this issue is still relevant to the latest version of better-auth by commenting here to keep the discussion open. - Otherwise, this issue will be automatically closed in 7 days. Thank you for your understanding and contribution!
Author
Owner

@slaymed commented on GitHub (Feb 23, 2026):

This issue is still relevant to our use case. We would like to keep it open for further discussion and updates.

@slaymed commented on GitHub (Feb 23, 2026): This issue is still relevant to our use case. We would like to keep it open for further discussion and updates.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#2346