[PR #1312] [CLOSED] feat: Passkey Plugin with Client-Side authenticatorAttachment and Global authenticatorSelection Configuration #3747

Closed
opened 2026-03-13 11:09:47 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/1312
Author: @benbehringer
Created: 1/30/2025
Status: Closed

Base: mainHead: main


📝 Commits (3)

  • 6a24e45 feat(passkey): Add authenticator attachment options and global configuration
  • 84bc480 docs(passkey: adding documentation for new configuration options
  • 65a3580 fix(passkey): omit undefined authenticatorAttachment query param

📊 Changes

3 files changed (+74 additions, -3 deletions)

View changed files

📝 docs/content/docs/plugins/passkey.mdx (+33 -1)
📝 packages/better-auth/src/plugins/passkey/client.ts (+12 -0)
📝 packages/better-auth/src/plugins/passkey/index.ts (+29 -2)

📄 Description

Description

This PR addresses Issue #1311 by enhancing the Passkey plugin in better-auth to allow clients to specify the authenticatorAttachment (platform or cross-platform) during passkey registration. Additionally, it introduces a global authenticatorSelection configuration to enforce server-side policies for residentKey and userVerification.

Changes

  • Client-Side authenticatorAttachment Option:

    • Enables specifying 'platform' or 'cross-platform' during passkey registration.
  • Global authenticatorSelection Configuration:

    • Adds global settings for residentKey and userVerification to enforce server-side policies.
  • TypeScript and API Updates:

    • Updated TypeScript types and API endpoints to support new options.
  • Backward Compatibility:

    • Maintained existing functionality with default settings for existing implementations.
  • Documentation:

    • Added guides for global and client-side settings.

Testing

Register Passkey:

  • Test with different authenticatorAttachment options and authenticatorSelection.

Related Issue


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/better-auth/better-auth/pull/1312 **Author:** [@benbehringer](https://github.com/benbehringer) **Created:** 1/30/2025 **Status:** ❌ Closed **Base:** `main` ← **Head:** `main` --- ### 📝 Commits (3) - [`6a24e45`](https://github.com/better-auth/better-auth/commit/6a24e457549bede58bc495487d511ddf61809a9c) feat(passkey): Add authenticator attachment options and global configuration - [`84bc480`](https://github.com/better-auth/better-auth/commit/84bc480a6a7009de97d56c0fccfbe1b50b3abd90) docs(passkey: adding documentation for new configuration options - [`65a3580`](https://github.com/better-auth/better-auth/commit/65a35806a70eece861a5edb33a1f99dcf2e5ee13) fix(passkey): omit undefined authenticatorAttachment query param ### 📊 Changes **3 files changed** (+74 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `docs/content/docs/plugins/passkey.mdx` (+33 -1) 📝 `packages/better-auth/src/plugins/passkey/client.ts` (+12 -0) 📝 `packages/better-auth/src/plugins/passkey/index.ts` (+29 -2) </details> ### 📄 Description **Description** This PR addresses **Issue #1311** by enhancing the Passkey plugin in `better-auth` to allow clients to specify the `authenticatorAttachment` (`platform` or `cross-platform`) during passkey registration. Additionally, it introduces a global `authenticatorSelection` configuration to enforce server-side policies for `residentKey` and `userVerification`. **Changes** - **Client-Side `authenticatorAttachment` Option:** - Enables specifying `'platform'` or `'cross-platform'` during passkey registration. - **Global `authenticatorSelection` Configuration:** - Adds global settings for `residentKey` and `userVerification` to enforce server-side policies. - **TypeScript and API Updates:** - Updated TypeScript types and API endpoints to support new options. - **Backward Compatibility:** - Maintained existing functionality with default settings for existing implementations. - **Documentation:** - Added guides for global and client-side settings. **Testing** **Register Passkey:** - Test with different `authenticatorAttachment` options and `authenticatorSelection`. **Related Issue** - Addresses #1311 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-03-13 11:09:47 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#3747