[GH-ISSUE #1311] [Passkey] Allow customization of authenticatorSelection #8688

Closed
opened 2026-04-13 03:50:56 -05:00 by GiteaMirror · 3 comments
Owner

Originally created by @benbehringer on GitHub (Jan 30, 2025).
Original GitHub issue: https://github.com/better-auth/better-auth/issues/1311

Is this suited for github?

  • Yes, this is suited for github

Yes, the current implementation of the Passkey plugin in better-auth lacks flexibility for clients to specify the type of authenticator (platform, cross-platform, or both) they wish to use during passkey registration. The plugin currently enforces the use of platform passkeys, restricting users from opting for cross-platform authenticators. Additionally, while server-side policies prefer settings for residentKey and userVerification, there is no straightforward way to allow clients to influence these settings based on specific application requirements or user preferences.

Describe the solution you'd like

Enhance the Passkey plugin to allow clients to specify the authenticatorAttachment (platform or cross-platform) during passkey registration while ensuring that server-side policies for residentKey and userVerification remain preferred. This involves:

Client-Side Customization
Allow clients to specify authenticatorAttachment when registering a passkey to choose between platform and cross-platform authenticators. This enables to have for instance a platform and cross-platform option.

Server-Side Configuration:
Introduce a global authenticatorSelection configuration to set default policies for residentKey and userVerification, ensuring these settings take precedence over any client-side inputs.

Describe alternatives you've considered

No Client-Side Customization:

  • Description: Retain the existing implementation where authenticatorSelection is entirely controlled by the server.
  • Drawback: Reduces flexibility for clients who may have legitimate reasons to specify the type of authenticator, potentially impacting user experience and accessibility.

Additional context

No response

Originally created by @benbehringer on GitHub (Jan 30, 2025). Original GitHub issue: https://github.com/better-auth/better-auth/issues/1311 ### Is this suited for github? - [x] Yes, this is suited for github ### Is your feature request related to a problem? Please describe. Yes, the current implementation of the Passkey plugin in better-auth lacks flexibility for clients to specify the type of authenticator (platform, cross-platform, or both) they wish to use during passkey registration. The plugin currently enforces the use of platform passkeys, restricting users from opting for cross-platform authenticators. Additionally, while server-side policies prefer settings for residentKey and userVerification, there is no straightforward way to allow clients to influence these settings based on specific application requirements or user preferences. ### Describe the solution you'd like Enhance the Passkey plugin to allow clients to specify the authenticatorAttachment (platform or cross-platform) during passkey registration while ensuring that server-side policies for residentKey and userVerification remain preferred. This involves: **Client-Side Customization** Allow clients to specify authenticatorAttachment when registering a passkey to choose between platform and cross-platform authenticators. This enables to have for instance a platform and cross-platform option. **Server-Side Configuration**: Introduce a global authenticatorSelection configuration to set default policies for residentKey and userVerification, ensuring these settings take precedence over any client-side inputs. ### Describe alternatives you've considered **No Client-Side Customization**: - Description: Retain the existing implementation where authenticatorSelection is entirely controlled by the server. - Drawback: Reduces flexibility for clients who may have legitimate reasons to specify the type of authenticator, potentially impacting user experience and accessibility. ### Additional context _No response_
GiteaMirror added the lockedstale labels 2026-04-13 03:50:56 -05:00
Author
Owner

@benbehringer commented on GitHub (Jan 30, 2025):

See also: https://github.com/MasterKale/SimpleWebAuthn/discussions/659

<!-- gh-comment-id:2624957036 --> @benbehringer commented on GitHub (Jan 30, 2025): See also: https://github.com/MasterKale/SimpleWebAuthn/discussions/659
Author
Owner

@benbehringer commented on GitHub (Jan 30, 2025):

Current Setup: Platform-Only Authenticators

Image

New Setup: Enable Cross-Platform Authenticators by default

Image Image

Configurability

These settings should remain configurable to accommodate various authentication requirements.

<!-- gh-comment-id:2624993066 --> @benbehringer commented on GitHub (Jan 30, 2025): **Current Setup: Platform-Only Authenticators** <img width="448" alt="Image" src="https://github.com/user-attachments/assets/8ef40438-a720-4775-add0-b555b921581a" /> **New Setup: Enable Cross-Platform Authenticators by default** <img width="441" alt="Image" src="https://github.com/user-attachments/assets/fba41378-17b1-4dcf-b781-69d6913001fd" /> <img width="439" alt="Image" src="https://github.com/user-attachments/assets/132a4d58-b162-405f-b7c4-60403daa4edc" /> **Configurability** These settings should remain configurable to accommodate various authentication requirements.
Author
Owner

@dosubot[bot] commented on GitHub (Jun 13, 2025):

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

Issue Summary:

  • Proposal to enhance Passkey plugin for better customization in passkey registration.
  • Current limitation: enforced platform passkeys; suggestion to allow choice between platform and cross-platform authenticators.
  • Recommendation for global server-side configuration for default policies on residentKey and userVerification.
  • Reference to related discussion on SimpleWebAuthn with visual examples provided.

Next Steps:

  • Please confirm if this issue is still relevant to the latest version of the better-auth repository by commenting here.
  • If no updates are provided, the issue will be automatically closed in 7 days.

Thank you for your understanding and contribution!

<!-- gh-comment-id:2970840616 --> @dosubot[bot] commented on GitHub (Jun 13, 2025): Hi, @benbehringer. I'm [Dosu](https://dosu.dev), and I'm helping the better-auth team manage their backlog. I'm marking this issue as stale. **Issue Summary:** - Proposal to enhance Passkey plugin for better customization in passkey registration. - Current limitation: enforced platform passkeys; suggestion to allow choice between platform and cross-platform authenticators. - Recommendation for global server-side configuration for default policies on residentKey and userVerification. - Reference to related discussion on SimpleWebAuthn with visual examples provided. **Next Steps:** - Please confirm if this issue is still relevant to the latest version of the better-auth repository by commenting here. - If no updates are provided, the issue will be automatically closed in 7 days. Thank you for your understanding and contribution!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#8688