mirror of
https://github.com/better-auth/better-auth.git
synced 2026-07-27 16:53:02 -05:00
Sync main (through #9821/#9820/#9822/#9768) into next. Conflicting package.json files keep next's version and intentional divergences (for example the cli's c12 v4) while taking main's dependency updates, including the samlify 2.13.1 and fast-xml-parser security bumps; the lockfile is regenerated from the reconciled set. The 13 source/doc/test conflicts take next's refactored architecture as the baseline; main's colliding fixes are re-applied on top in the following per-domain commits. Clean main fixes land via this merge, including the auto-restored account-takeover defenses #9578 and #9577.
Better Auth Passkey Plugin
Installation
# Using npm
npm install better-auth @better-auth/passkey
# Using yarn
yarn add better-auth @better-auth/passkey
# Using pnpm
pnpm add better-auth @better-auth/passkey
# Using bun
bun add better-auth @better-auth/passkey
Usage
Server
import { betterAuth } from 'better-auth';
import { passkey } from '@better-auth/passkey';
export const auth = betterAuth({
plugins: [
passkey({
rpID: 'example.com',
rpName: 'My App',
}),
],
});
Client
import { createAuthClient } from 'better-auth/client';
import { passkeyClient } from '@better-auth/passkey/client';
export const authClient = createAuthClient({
plugins: [passkeyClient()],
});
Documentation
For more information, visit the Better Auth Passkey documentation.
License
MIT