Adds Auth0 login to Payload through a custom auth strategy attached to an auth collection. It works with express-openid-connect on the server and provides a login button, an avatar component and a picture field for the admin panel. It targets Payload 2.x and needs Auth0 client credentials and callback routes configured.
Extends payloadcms with Auth0 integration
Installation
npm i payload-auth0-plugin62
Stars
5
Forks
16
Open Issues
9 months ago
Last Updated
84
Weekly Downloads
v0.1.15
npm Version
148.3 KB
Unpacked Size
6
Dependencies
620 since Sep 7
| Date | Stars |
|---|---|
| Dec 6, 2026 | 62 |
| Dec 5, 2026 | 62 |
| Dec 4, 2026 | 62 |
| Dec 3, 2026 | 62 |
| Dec 2, 2026 | 62 |
| Dec 1, 2026 | 62 |
| Nov 30, 2026 | 62 |
| Nov 29, 2026 | 62 |
| Nov 28, 2026 | 62 |
| Nov 27, 2026 | 62 |
| Nov 26, 2026 | 62 |
| Nov 25, 2026 | 62 |
| Nov 24, 2026 | 62 |
| Nov 23, 2026 | 62 |
| Nov 22, 2026 | 62 |
| Nov 21, 2026 | 62 |
| Nov 20, 2026 | 62 |
| Nov 19, 2026 | 62 |
| Nov 18, 2026 | 62 |
| Nov 17, 2026 | 62 |
| Nov 16, 2026 | 62 |
| Nov 15, 2026 | 62 |
| Nov 14, 2026 | 62 |
| Nov 13, 2026 | 62 |
| Nov 12, 2026 | 62 |
| Nov 11, 2026 | 62 |
| Nov 10, 2026 | 62 |
| Nov 9, 2026 | 62 |
| Nov 8, 2026 | 62 |
| Nov 7, 2026 | 62 |
| Nov 6, 2026 | 62 |
| Nov 5, 2026 | 62 |
| Nov 4, 2026 | 62 |
| Nov 3, 2026 | 62 |
| Nov 2, 2026 | 62 |
| Nov 1, 2026 | 62 |
| Oct 31, 2026 | 62 |
| Oct 30, 2026 | 62 |
| Oct 29, 2026 | 62 |
| Oct 28, 2026 | 62 |
| Oct 27, 2026 | 62 |
| Oct 26, 2026 | 62 |
| Oct 25, 2026 | 62 |
| Oct 24, 2026 | 62 |
| Oct 23, 2026 | 62 |
| Oct 22, 2026 | 62 |
| Oct 21, 2026 | 62 |
| Oct 20, 2026 | 62 |
| Oct 19, 2026 | 62 |
| Oct 18, 2026 | 62 |
| Oct 17, 2026 | 62 |
| Oct 16, 2026 | 62 |
| Oct 15, 2026 | 62 |
| Oct 14, 2026 | 62 |
| Oct 13, 2026 | 62 |
| Oct 12, 2026 | 62 |
| Oct 11, 2026 | 62 |
| Oct 10, 2026 | 62 |
| Oct 9, 2026 | 62 |
| Oct 8, 2026 | 62 |
| Oct 7, 2026 | 62 |
| Oct 6, 2026 | 62 |
| Oct 5, 2026 | 62 |
| Oct 4, 2026 | 62 |
| Oct 3, 2026 | 62 |
| Oct 2, 2026 | 62 |
| Oct 1, 2026 | 62 |
| Sep 30, 2026 | 62 |
| Sep 29, 2026 | 62 |
| Sep 28, 2026 | 62 |
| Sep 27, 2026 | 62 |
| Sep 26, 2026 | 62 |
| Sep 25, 2026 | 62 |
| Sep 24, 2026 | 62 |
| Sep 23, 2026 | 62 |
| Sep 22, 2026 | 62 |
| Sep 21, 2026 | 62 |
| Sep 20, 2026 | 62 |
| Sep 19, 2026 | 62 |
| Sep 18, 2026 | 62 |
| Sep 17, 2026 | 62 |
| Sep 16, 2026 | 62 |
| Sep 15, 2026 | 62 |
| Sep 14, 2026 | 62 |
| Sep 13, 2026 | 62 |
| Sep 12, 2026 | 62 |
| Sep 11, 2026 | 62 |
| Sep 10, 2026 | 62 |
| Sep 9, 2026 | 62 |
| Sep 8, 2026 | 62 |
| Sep 7, 2026 | 62 |
84−36 since Sep 7
| Date | Weekly downloads |
|---|---|
| Dec 6, 2026 | 84 |
| Dec 5, 2026 | 67 |
| Dec 4, 2026 | 29 |
| Dec 3, 2026 | 30 |
| Dec 2, 2026 | 29 |
| Dec 1, 2026 | 30 |
| Nov 30, 2026 | 31 |
| Nov 29, 2026 | 48 |
| Nov 28, 2026 | 48 |
| Nov 27, 2026 | 47 |
| Nov 26, 2026 | 46 |
| Nov 25, 2026 | 55 |
| Nov 24, 2026 | 54 |
| Nov 23, 2026 | 53 |
| Nov 22, 2026 | 43 |
| Nov 21, 2026 | 47 |
| Nov 20, 2026 | 99 |
| Nov 19, 2026 | 107 |
| Nov 18, 2026 | 114 |
| Nov 17, 2026 | 114 |
| Nov 16, 2026 | 116 |
| Nov 15, 2026 | 107 |
| Nov 14, 2026 | 100 |
| Nov 13, 2026 | 49 |
| Nov 12, 2026 | 50 |
| Nov 11, 2026 | 33 |
| Nov 10, 2026 | 35 |
| Nov 9, 2026 | 54 |
| Nov 8, 2026 | 51 |
| Nov 7, 2026 | 51 |
| Nov 6, 2026 | 47 |
| Nov 5, 2026 | 36 |
| Nov 4, 2026 | 34 |
| Nov 3, 2026 | 33 |
| Nov 2, 2026 | 13 |
| Nov 1, 2026 | 13 |
| Oct 31, 2026 | 13 |
| Oct 30, 2026 | 20 |
| Oct 29, 2026 | 18 |
| Oct 28, 2026 | 16 |
| Oct 27, 2026 | 17 |
| Oct 26, 2026 | 26 |
| Oct 25, 2026 | 26 |
| Oct 24, 2026 | 27 |
| Oct 23, 2026 | 18 |
| Oct 22, 2026 | 20 |
| Oct 21, 2026 | 20 |
| Oct 20, 2026 | 18 |
| Oct 19, 2026 | 8 |
| Oct 18, 2026 | 7 |
| Oct 17, 2026 | 9 |
| Oct 16, 2026 | 23 |
| Oct 15, 2026 | 67 |
| Oct 14, 2026 | 80 |
| Oct 13, 2026 | 80 |
| Oct 12, 2026 | 80 |
| Oct 11, 2026 | 100 |
| Oct 10, 2026 | 116 |
| Oct 9, 2026 | 134 |
| Oct 8, 2026 | 107 |
| Oct 7, 2026 | 104 |
| Oct 6, 2026 | 104 |
| Oct 5, 2026 | 104 |
| Oct 4, 2026 | 108 |
| Oct 3, 2026 | 113 |
| Oct 2, 2026 | 100 |
| Oct 1, 2026 | 88 |
| Sep 30, 2026 | 99 |
| Sep 29, 2026 | 119 |
| Sep 28, 2026 | 119 |
| Sep 27, 2026 | 106 |
| Sep 26, 2026 | 90 |
| Sep 25, 2026 | 92 |
| Sep 24, 2026 | 109 |
| Sep 23, 2026 | 112 |
| Sep 22, 2026 | 112 |
| Sep 21, 2026 | 123 |
| Sep 20, 2026 | 128 |
| Sep 19, 2026 | 122 |
| Sep 18, 2026 | 108 |
| Sep 17, 2026 | 95 |
| Sep 16, 2026 | 82 |
| Sep 15, 2026 | 62 |
| Sep 14, 2026 | 54 |
| Sep 13, 2026 | 59 |
| Sep 12, 2026 | 91 |
| Sep 11, 2026 | 126 |
| Sep 10, 2026 | 119 |
| Sep 9, 2026 | 118 |
| Sep 8, 2026 | 118 |
| Sep 7, 2026 | 120 |
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/551363564-root)<a href="https://payloaddirectory.dev/plugins/551363564-root"><img src="https://payloaddirectory.dev/badge/551363564-root.svg" alt="Payload Directory"></a>README
Extends payloadcms with Auth0 integration
yarn add payload-auth0-plugin
import { auth } from "express-openid-connect";
const config = {
authRequired: false,
idpLogout: true,
auth0Logout: true,
baseURL: process.env.REACT_APP_SERVER_BASE_URL,
clientID: process.env.AUTH0_CLIENT_ID,
clientSecret: process.env.AUTH0_CLIENT_SECRET,
issuerBaseURL: process.env.AUTH0_DOMAIN,
secret: "<LONG_RANDOM_STRING>",
routes: {
login: process.env.REACT_APP_AUTH0_LOGIN_URL,
logout: process.env.REACT_APP_AUTH0_LOGOUT_URL,
callback: process.env.AUTH0_CALLBACK_URL,
},
};
app.use(auth(config));
REACT_APP_SERVER_BASE_URL=http://localhost:3000
REACT_APP_AUTH0_LOGIN_URL=/auth0/login # the one you set up in Auth0
REACT_APP_AUTH0_LOGOUT_URL=/auth0/logout # the one you set up in Auth0
AUTH0_CALLBACK_URL=/auth0/callback # the one you set up in Auth0
import Auth0Avatar from from "payload-auth0-plugin/dist/components/Auth0Avatar";
import { LoginButton } from "payload-auth0-plugin/dist/components";
export default buildConfig({
....
admin: {
avatar: Auth0Avatar,
logoutRoute: process.env.REACT_APP_AUTH0_LOGOUT_URL,
inactivityRoute: process.env.REACT_APP_INACTIVITY_URL,
components: {
afterLogin: [LoginButton()],
},
}
})
import { Auth0Strategy } from "payload-auth0-plugin";
import { PictureField } from "payload-auth0-plugin/dist/components";
const MyAuthCollection: CollectionConfig = {
slug: "authCollection",
auth: {
strategies: [
{
name: Auth0Strategy.name,
strategy: (ctx) => {
return new Auth0Strategy(ctx, "authCollection");
},
},
],
},
fields: [
{
name: "picture",
type: "text",
admin: {
hidden: true,
condition: (data) => {
return data.picture;
},
},
},
{
name: "pictureVisual",
type: "ui",
admin: {
position: "sidebar",
condition: (_, siblingData) => {
return siblingData.picture;
},
components: {
Field: PictureField,
Cell: PictureField,
},
},
},
{
name: "sub",
type: "text",
admin: {
readOnly: true,
condition: (data) => {
return data.sub;
},
},
},
],
};
Topics
payload authjs
Sign in to Payload CMS through Auth.js 5 providers and use the Auth.js session as the Payload user
903.1k/wk206v3
payload zitadel plugin
Log in to the Mzinga admin through Zitadel or another OIDC provider using authorization code with PKCE
72608/wk11v?
payload simple social login
Google and Microsoft social login for the Payload admin panel and auth collections
7119/wk3v3
payload auth
Replace Payload's built-in auth with Better Auth for a shared admin and frontend session
7021.0k/wk349v3
payload oauth2
Generic OAuth2 sign-in for Payload CMS with support for providers such as Google, Zitadel and Apple
6913.0k/wk200v3
oidc
OpenID Connect single sign-on for Payload using Authorization Code Flow with PKCE and native Payload sessions
65745/wk0v3