Adds passkey sign-in to Payload CMS as a wrapper around Better Auth and the Payload Better Auth plugin. It keeps Payload's default login screen, adds a passkey button and a passkey management section on the account screen. It requires a Better Auth secret, relying party settings and database migrations, and works with Payload 3.69 or later.
Add passkey support to Payload CMS.
Installation
npm i payload-passkey1
Stars
0
Forks
3
Open Issues
5 days ago
Last Updated
516
Weekly Downloads
v3.0.1
npm Version
126.4 KB
Unpacked Size
3
Dependencies
10 since Sep 7
| Date | Stars |
|---|---|
| Dec 6, 2026 | 1 |
| Dec 5, 2026 | 1 |
| Dec 4, 2026 | 1 |
| Dec 3, 2026 | 1 |
| Dec 2, 2026 | 1 |
| Dec 1, 2026 | 1 |
| Nov 30, 2026 | 1 |
| Nov 29, 2026 | 1 |
| Nov 28, 2026 | 1 |
| Nov 27, 2026 | 1 |
| Nov 26, 2026 | 1 |
| Nov 25, 2026 | 1 |
| Nov 24, 2026 | 1 |
| Nov 23, 2026 | 1 |
| Nov 22, 2026 | 1 |
| Nov 21, 2026 | 1 |
| Nov 20, 2026 | 1 |
| Nov 19, 2026 | 1 |
| Nov 18, 2026 | 1 |
| Nov 17, 2026 | 1 |
| Nov 16, 2026 | 1 |
| Nov 15, 2026 | 1 |
| Nov 14, 2026 | 1 |
| Nov 13, 2026 | 1 |
| Nov 12, 2026 | 1 |
| Nov 11, 2026 | 1 |
| Nov 10, 2026 | 1 |
| Nov 9, 2026 | 1 |
| Nov 8, 2026 | 1 |
| Nov 7, 2026 | 1 |
| Nov 6, 2026 | 1 |
| Nov 5, 2026 | 1 |
| Nov 4, 2026 | 1 |
| Nov 3, 2026 | 1 |
| Nov 2, 2026 | 1 |
| Nov 1, 2026 | 1 |
| Oct 31, 2026 | 1 |
| Oct 30, 2026 | 1 |
| Oct 29, 2026 | 1 |
| Oct 28, 2026 | 1 |
| Oct 27, 2026 | 1 |
| Oct 26, 2026 | 1 |
| Oct 25, 2026 | 1 |
| Oct 24, 2026 | 1 |
| Oct 23, 2026 | 1 |
| Oct 22, 2026 | 1 |
| Oct 21, 2026 | 1 |
| Oct 20, 2026 | 1 |
| Oct 19, 2026 | 1 |
| Oct 18, 2026 | 1 |
| Oct 17, 2026 | 1 |
| Oct 16, 2026 | 1 |
| Oct 15, 2026 | 1 |
| Oct 14, 2026 | 1 |
| Oct 13, 2026 | 1 |
| Oct 12, 2026 | 1 |
| Oct 11, 2026 | 1 |
| Oct 10, 2026 | 1 |
| Oct 9, 2026 | 1 |
| Oct 8, 2026 | 1 |
| Oct 7, 2026 | 1 |
| Oct 6, 2026 | 1 |
| Oct 5, 2026 | 1 |
| Oct 4, 2026 | 1 |
| Oct 3, 2026 | 1 |
| Oct 2, 2026 | 1 |
| Oct 1, 2026 | 1 |
| Sep 30, 2026 | 1 |
| Sep 29, 2026 | 1 |
| Sep 28, 2026 | 1 |
| Sep 27, 2026 | 1 |
| Sep 26, 2026 | 1 |
| Sep 25, 2026 | 1 |
| Sep 24, 2026 | 1 |
| Sep 23, 2026 | 1 |
| Sep 22, 2026 | 1 |
| Sep 21, 2026 | 1 |
| Sep 20, 2026 | 1 |
| Sep 19, 2026 | 1 |
| Sep 18, 2026 | 1 |
| Sep 17, 2026 | 1 |
| Sep 16, 2026 | 1 |
| Sep 15, 2026 | 1 |
| Sep 14, 2026 | 1 |
| Sep 13, 2026 | 1 |
| Sep 12, 2026 | 1 |
| Sep 11, 2026 | 1 |
| Sep 10, 2026 | 1 |
| Sep 9, 2026 | 1 |
| Sep 8, 2026 | 1 |
| Sep 7, 2026 | 1 |
516−115 since Sep 7
| Date | Weekly downloads |
|---|---|
| Dec 6, 2026 | 516 |
| Dec 5, 2026 | 497 |
| Dec 4, 2026 | 371 |
| Dec 3, 2026 | 648 |
| Dec 2, 2026 | 633 |
| Dec 1, 2026 | 551 |
| Nov 30, 2026 | 549 |
| Nov 29, 2026 | 489 |
| Nov 28, 2026 | 538 |
| Nov 27, 2026 | 544 |
| Nov 26, 2026 | 278 |
| Nov 25, 2026 | 447 |
| Nov 24, 2026 | 427 |
| Nov 23, 2026 | 428 |
| Nov 22, 2026 | 442 |
| Nov 21, 2026 | 418 |
| Nov 20, 2026 | 517 |
| Nov 19, 2026 | 666 |
| Nov 18, 2026 | 603 |
| Nov 17, 2026 | 809 |
| Nov 16, 2026 | 871 |
| Nov 15, 2026 | 870 |
| Nov 14, 2026 | 848 |
| Nov 13, 2026 | 936 |
| Nov 12, 2026 | 915 |
| Nov 11, 2026 | 828 |
| Nov 10, 2026 | 636 |
| Nov 9, 2026 | 610 |
| Nov 8, 2026 | 593 |
| Nov 7, 2026 | 719 |
| Nov 6, 2026 | 586 |
| Nov 5, 2026 | 419 |
| Nov 4, 2026 | 403 |
| Nov 3, 2026 | 543 |
| Nov 2, 2026 | 506 |
| Nov 1, 2026 | 501 |
| Oct 31, 2026 | 356 |
| Oct 30, 2026 | 304 |
| Oct 29, 2026 | 284 |
| Oct 28, 2026 | 265 |
| Oct 27, 2026 | 151 |
| Oct 26, 2026 | 201 |
| Oct 25, 2026 | 223 |
| Oct 24, 2026 | 235 |
| Oct 23, 2026 | 186 |
| Oct 22, 2026 | 200 |
| Oct 21, 2026 | 267 |
| Oct 20, 2026 | 242 |
| Oct 19, 2026 | 207 |
| Oct 18, 2026 | 192 |
| Oct 17, 2026 | 171 |
| Oct 16, 2026 | 203 |
| Oct 15, 2026 | 244 |
| Oct 14, 2026 | 241 |
| Oct 13, 2026 | 274 |
| Oct 12, 2026 | 522 |
| Oct 11, 2026 | 612 |
| Oct 10, 2026 | 671 |
| Oct 9, 2026 | 729 |
| Oct 8, 2026 | 680 |
| Oct 7, 2026 | 663 |
| Oct 6, 2026 | 792 |
| Oct 5, 2026 | 694 |
| Oct 4, 2026 | 590 |
| Oct 3, 2026 | 541 |
| Oct 2, 2026 | 487 |
| Oct 1, 2026 | 546 |
| Sep 30, 2026 | 774 |
| Sep 29, 2026 | 648 |
| Sep 28, 2026 | 553 |
| Sep 27, 2026 | 669 |
| Sep 26, 2026 | 830 |
| Sep 25, 2026 | 1,037 |
| Sep 24, 2026 | 1,102 |
| Sep 23, 2026 | 940 |
| Sep 22, 2026 | 1,178 |
| Sep 21, 2026 | 1,175 |
| Sep 20, 2026 | 1,105 |
| Sep 19, 2026 | 974 |
| Sep 18, 2026 | 766 |
| Sep 17, 2026 | 668 |
| Sep 16, 2026 | 616 |
| Sep 15, 2026 | 407 |
| Sep 14, 2026 | 402 |
| Sep 13, 2026 | 563 |
| Sep 12, 2026 | 584 |
| Sep 11, 2026 | 595 |
| Sep 10, 2026 | 638 |
| Sep 9, 2026 | 597 |
| Sep 8, 2026 | 551 |
| Sep 7, 2026 | 631 |
Each point is npm's rolling 7-day download count.
Health Score
Composite score based on GitHub activity, stars, npm downloads, publish recency, dependency count, and package size.
Badge for your README
[](https://payloaddirectory.dev/plugins/1320143736-root)<a href="https://payloaddirectory.dev/plugins/1320143736-root"><img src="https://payloaddirectory.dev/badge/1320143736-root.svg" alt="Payload Directory"></a>README
This plugin adds passkey support to Payload CMS using Better Auth.
Although it is a wrapper around @delmaredigital/payload-better-auth, this plugin focuses specifically on passkeys. It preserves Payload's default login screen and uses Payload's UI components to match Payload's design language.


Depending on the user's setup, they can log in using one of the following methods:
pnpm add payload-passkey
# .env
BETTER_AUTH_SECRET=your-secret-key-longer-than-32-characters
// payload.config.ts
import { buildConfig } from "payload";
import { payloadPasskey } from "payload-passkey";
const config = buildConfig({
collections: [
{
slug: "users",
auth: true,
fields: [...],
},
],
plugins: [
payloadPasskey({
rpID: "your-domain.example.com",
rpName: "Example App",
origin: "https://your-domain.example.com",
modelName: "user",
userCollection: "users",
baseURL: "https://your-domain.example.com",
secret: process.env.BETTER_AUTH_SECRET,
trustedOrigins: ["https://your-domain.example.com"],
generateId: "serial",
firstUserAdmin: true,
enablePasskeyAutofill: true
})
]
});
export default config;
Once configured, run the database migrations. If you are using Payload's default authentication strategy, you do not need to update users' passwords; running the database migrations is sufficient.
npm run payload migrate:create
npm run payload migrate
This plugin can also be used alongside Payload TOTP.
// payload.config.ts
import { buildConfig } from "payload";
import { payloadPasskey } from "payload-passkey";
const config = buildConfig({
collections: [
{
slug: "users",
auth: true,
fields: [...],
},
],
plugins: [
payloadPasskey({
enableTotpCompatibility: true,
rpID: "your-domain.example.com",
rpName: "Example App",
origin: "https://your-domain.example.com",
modelName: "user",
userCollection: "users",
baseURL: "https://your-domain.example.com",
secret: process.env.BETTER_AUTH_SECRET,
trustedOrigins: ["https://your-domain.example.com"],
generateId: "serial",
firstUserAdmin: true,
enablePasskeyAutofill: true
}),
// `payloadTotp()` must be called after `payloadPasskey()`;
// otherwise, the collection generated by payload-passkey won't be protected by Payload TOTP.
payloadTotp({
collection: "users",
totp: {
issuer: "Example App"
}
})
]
});
export default config;
Once configured, run the database migrations. If you are using Payload's default authentication strategy, you do not need to update users' passwords; running the database migrations is sufficient.
npm run payload migrate:create
npm run payload migrate
For all available options and their descriptions, see the documentation for PayloadPasskeyOptions.
This plugin is a wrapper around @delmaredigital/payload-better-auth and Better Auth. Some of the component code was based on @delmaredigital/payload-better-auth. The login button uses an icon from lucide-react.
Copyright (c) 2026 Delmare Digital
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Copyright (c) 2026 Lucide Icons and Contributors
Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
payload better auth
Better Auth database adapter and plugins that run authentication through Payload collections
9011.9k/wk77v3 v4
payload auth
Replace Payload's built-in auth with Better Auth for a shared admin and frontend session
7021.0k/wk349v3
payload plugin mfa
Two-step sign-in for Payload with authenticator codes, passkeys, emailed and recovery codes, and an approved recovery…
64406/wk0v3
payload better auth
Integrate Better Auth into Payload CMS 3 with generated collections, API endpoints and admin login
3474v3
payload better auth
Replace Payload's built-in auth with Better Auth, including admin email OTP and session-based req.user
301v3
payload totp
Add TOTP-based two-factor authentication to a Payload auth collection using authenticator apps
8425.1k/wk168v3