[PR #5769] [MERGED] refactor: split the passkey plugin into a separate package #31815

Closed
opened 2026-04-17 22:41:22 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/5769
Author: @bytaesu
Created: 11/5/2025
Status: Merged
Merged: 11/5/2025
Merged by: @Bekacru

Base: canaryHead: 2025-11-05/feat/better-auth-passkey


📝 Commits (10+)

  • e330c9c refactor: extract passkey plugin into a separate package
  • c07b55b chore: update passkey related codes
  • 967675e docs: update hero codeblock content
  • 2b2f9f3 docs: update passkey plugin content
  • a798e92 chore: update comment
  • 41f5e16 fix: lockfile
  • ceb961f chore: add @standard-schema/spec dependency
  • 1f17467 fix: lockfile
  • 1d52a46 Merge branch 'canary' into 2025-11-05/feat/better-auth-passkey
  • 4b31a9f chore: update project reference

📊 Changes

27 files changed (+455 additions, -249 deletions)

View changed files

📝 demo/nextjs/lib/auth-client.ts (+1 -1)
📝 demo/nextjs/lib/auth.ts (+1 -1)
📝 demo/nextjs/package.json (+1 -0)
📝 docs/components/landing/hero.tsx (+6 -3)
📝 docs/content/docs/plugins/passkey.mdx (+29 -31)
📝 e2e/smoke/test/fixtures/tsconfig-declaration/package.json (+1 -0)
📝 e2e/smoke/test/fixtures/tsconfig-declaration/src/demo.ts (+1 -1)
📝 packages/better-auth/package.json (+0 -10)
📝 packages/better-auth/src/client/client.test.ts (+2 -2)
📝 packages/better-auth/src/client/plugins/index.ts (+0 -2)
📝 packages/better-auth/tsdown.config.ts (+0 -1)
📝 packages/cli/package.json (+1 -0)
📝 packages/cli/src/commands/init.ts (+2 -2)
📝 packages/cli/test/generate-all-db.test.ts (+1 -1)
packages/passkey/README.md (+54 -0)
packages/passkey/package.json (+73 -0)
📝 packages/passkey/src/client.ts (+5 -4)
packages/passkey/src/error-codes.ts (+12 -0)
📝 packages/passkey/src/index.ts (+29 -155)
📝 packages/passkey/src/passkey.test.ts (+2 -2)

...and 7 more files

📄 Description

This PR includes the following changes:

  • passkey is now split into a separate package.
  • Updated import paths in the internal code to reflect the change.
  • Adjusted the documentation content accordingly.

https://github.com/better-auth/better-auth/pull/5494: can be closed (duplicate)
https://github.com/better-auth/better-auth/issues/2036: can be closed
https://github.com/better-auth/better-auth/pull/4984: can be closed
https://github.com/better-auth/better-auth/pull/5736: should be used
https://github.com/better-auth/better-auth/pull/5209: should be used


Summary by cubic

Split the passkey plugin into a standalone package, @better-auth/passkey, with dedicated server and client entry points. Updated imports, docs, CLI scaffolding, and removed passkey-related code from better-auth.

  • Refactors

    • Extracted passkey into packages/passkey with exports for server (.) and client (./client).
    • Moved types, schema, error codes, and utils into the new package.
    • Removed passkey plugin and SimpleWebAuthn deps from better-auth.
    • Updated demo, e2e fixtures, tests, and CLI to use new import paths.
    • Refreshed docs with installation steps and new imports; adjusted landing hero example.
  • Migration

    • Install: npm install @better-auth/passkey
    • Server import: change from better-auth/plugins/passkey to @better-auth/passkey
    • Client import: change passkeyClient from better-auth/client/plugins to @better-auth/passkey/client

Written for commit 7d114bf5ce. Summary will update automatically on new commits.


🔄 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/5769 **Author:** [@bytaesu](https://github.com/bytaesu) **Created:** 11/5/2025 **Status:** ✅ Merged **Merged:** 11/5/2025 **Merged by:** [@Bekacru](https://github.com/Bekacru) **Base:** `canary` ← **Head:** `2025-11-05/feat/better-auth-passkey` --- ### 📝 Commits (10+) - [`e330c9c`](https://github.com/better-auth/better-auth/commit/e330c9cbefd691678421646c7a1970ed8d7311a3) refactor: extract passkey plugin into a separate package - [`c07b55b`](https://github.com/better-auth/better-auth/commit/c07b55be167a1696f7e76d4102cc2e292bbb3f16) chore: update passkey related codes - [`967675e`](https://github.com/better-auth/better-auth/commit/967675e397b44145ef88c657139f6370926818ba) docs: update hero codeblock content - [`2b2f9f3`](https://github.com/better-auth/better-auth/commit/2b2f9f310e55adf14325a7b630ce45456af8b365) docs: update passkey plugin content - [`a798e92`](https://github.com/better-auth/better-auth/commit/a798e925964662639d14e943c219e249d48582a4) chore: update comment - [`41f5e16`](https://github.com/better-auth/better-auth/commit/41f5e16be9c71324e298863d8dc1cf24ca7dfed9) fix: lockfile - [`ceb961f`](https://github.com/better-auth/better-auth/commit/ceb961fdce4087e71a10577e066433fc57044b7b) chore: add @standard-schema/spec dependency - [`1f17467`](https://github.com/better-auth/better-auth/commit/1f17467de914d677b0b5bdbd7a37d356d81b4354) fix: lockfile - [`1d52a46`](https://github.com/better-auth/better-auth/commit/1d52a4694d54a49e3ed826aae08b9291b2c2b3ee) Merge branch 'canary' into 2025-11-05/feat/better-auth-passkey - [`4b31a9f`](https://github.com/better-auth/better-auth/commit/4b31a9fa8f8332d53138047c88da889593267df9) chore: update project reference ### 📊 Changes **27 files changed** (+455 additions, -249 deletions) <details> <summary>View changed files</summary> 📝 `demo/nextjs/lib/auth-client.ts` (+1 -1) 📝 `demo/nextjs/lib/auth.ts` (+1 -1) 📝 `demo/nextjs/package.json` (+1 -0) 📝 `docs/components/landing/hero.tsx` (+6 -3) 📝 `docs/content/docs/plugins/passkey.mdx` (+29 -31) 📝 `e2e/smoke/test/fixtures/tsconfig-declaration/package.json` (+1 -0) 📝 `e2e/smoke/test/fixtures/tsconfig-declaration/src/demo.ts` (+1 -1) 📝 `packages/better-auth/package.json` (+0 -10) 📝 `packages/better-auth/src/client/client.test.ts` (+2 -2) 📝 `packages/better-auth/src/client/plugins/index.ts` (+0 -2) 📝 `packages/better-auth/tsdown.config.ts` (+0 -1) 📝 `packages/cli/package.json` (+1 -0) 📝 `packages/cli/src/commands/init.ts` (+2 -2) 📝 `packages/cli/test/generate-all-db.test.ts` (+1 -1) ➕ `packages/passkey/README.md` (+54 -0) ➕ `packages/passkey/package.json` (+73 -0) 📝 `packages/passkey/src/client.ts` (+5 -4) ➕ `packages/passkey/src/error-codes.ts` (+12 -0) 📝 `packages/passkey/src/index.ts` (+29 -155) 📝 `packages/passkey/src/passkey.test.ts` (+2 -2) _...and 7 more files_ </details> ### 📄 Description This PR includes the following changes: - `passkey` is now split into a separate package. - Updated import paths in the internal code to reflect the change. - Adjusted the documentation content accordingly. --- ### Related issues and PRs: https://github.com/better-auth/better-auth/pull/5494: can be closed (duplicate) https://github.com/better-auth/better-auth/issues/2036: can be closed https://github.com/better-auth/better-auth/pull/4984: can be closed https://github.com/better-auth/better-auth/pull/5736: should be used https://github.com/better-auth/better-auth/pull/5209: should be used <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Split the passkey plugin into a standalone package, @better-auth/passkey, with dedicated server and client entry points. Updated imports, docs, CLI scaffolding, and removed passkey-related code from better-auth. - **Refactors** - Extracted passkey into packages/passkey with exports for server (.) and client (./client). - Moved types, schema, error codes, and utils into the new package. - Removed passkey plugin and SimpleWebAuthn deps from better-auth. - Updated demo, e2e fixtures, tests, and CLI to use new import paths. - Refreshed docs with installation steps and new imports; adjusted landing hero example. - **Migration** - Install: npm install @better-auth/passkey - Server import: change from better-auth/plugins/passkey to @better-auth/passkey - Client import: change passkeyClient from better-auth/client/plugins to @better-auth/passkey/client <sup>Written for commit 7d114bf5ce9a88d72202fd4610f4c6835d45eeda. Summary will update automatically on new commits.</sup> <!-- End of auto-generated description by cubic. --> --- <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-04-17 22:41:22 -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#31815