Auth adapters for Payload CMS 2

Replace the Payload CMS admin login with Better Auth or Cloudflare Access. For local development, one adapter signs every request in as a fixed user.

Signs in Payload users from Cloudflare Access JWT tokens and creates missing users

Auto-login strategy that signs every visitor in as one fixed local user

About these packages

Auth adapters change how people sign in to Payload. They replace or bypass the built-in email and password login. Your access rules still decide which documents a user can read and change.

What these adapters cover

  • Payload Auth: Better Auth in place of the admin login
  • One shared session for your app and the Payload admin
  • Cloudflare Access JWT sign-in that creates missing accounts
  • Fixed Local Auth: one local user for development and tests

Choosing an auth adapter

Payload Auth fits apps that already use Better Auth and want one session for the site and the admin panel. Similar Better Auth integrations also appear among the plugins, so check the package name before you install. Cloudflare JWT Auth fits admin panels behind Cloudflare Access. Fixed Local Auth removes the login screen entirely, so use it only in local development and tests. OAuth, SSO and passkeys are in the auth category of the plugins catalog.

Frequently asked questions

How do I use Better Auth with Payload CMS?

Payload Auth replaces Payload's admin login with Better Auth and shares one session with your app. Check the package name before you install it, because the auth plugins include similar Better Auth integrations.

Can I skip the Payload login during local development?

Yes. Fixed Local Auth logs every request in as one fixed local user. Anyone who can reach the server gets that user's access, so use it only for local development and tests.

How does Cloudflare Access login work with Payload?

Cloudflare JWT Auth reads the Cloudflare Access JWT on each request, logs in the matching Payload user and creates the account if it doesn't exist yet.