Newsletter
Join the Community
Subscribe to our newsletter for the latest news and updates
A Gatsby Theme for adding Auth0 to your application.

Starter for Next.js with Pages Router + Material UI + TypeScript

A Create React App starter pre-configured with Tailwind CSS, PostCSS, and Vercel deployment readiness.

A minimal starter project integrating TailwindCSS 1.2.0 with Nuxt.js through PostCSS, with Yarn and CodeSandbox support.

A Next.js GitHub homepage clone template with TypeScript, TailwindCSS, Framer Motion and React Spring.

A simple and honest theme to help you set up a production-grade website in no time.
Gatsby Theme Auth0 is a Gatsby theme that integrates Auth0 authentication into Gatsby applications, providing login/logout components, a callback page, and a React hook for auth state.
Gatsby Theme Auth0 is a Gatsby theme, published on npm as gatsby-theme-auth0, that adds Auth0 authentication to a Gatsby application. It takes configuration options such as Auth0 domain, client ID, and callback URL in gatsby-config.js and produces authentication features: a login/logout service, a useAuth hook, and an automatic callback page. It is maintained by epilande on GitHub and licensed under the MIT license.
Install the theme with npm, add it to the plugins array in gatsby-config.js with your Auth0 domain, client ID, and redirect URI, and set the optional parameters. The theme then provides an AuthService for login/logout and a useAuth hook for reading authentication state. The callback page is generated automatically, and developers can override it using Gatsby component shadowing.
Free and open source under the MIT license.
Run npm install --save gatsby-theme-auth0, then add it to the plugins array in gatsby-config.js with the required domain, clientID, and redirectUri options. These are typically pulled from environment variables.
Yes. The theme uses Auth0's universal login, which supports SSO. The repository includes two demo sites showing default and custom configurations.
Yes. You can override the default callback component by creating src/gatsby-theme-auth0/components/callback.js in your project, following Gatsby's component shadowing pattern.
The default responseType is "token id_token" and the default scope is "openid email profile". Both can be overridden through theme options.
Copy the demo application's .env.example to .env.development, fill in the Auth0 environment variables, and run yarn dev. The demo will be available at http://localhost:8000.
