nextjs - auth0 sample configuration

Clone the auth0 sample using the following command

npx create-next-app --example auth0 auth0-app

 Next, cd auth0-app. Ensure you created a file call .env.local 

Then you need to configure the followings 


AUTH0_ISSUER_BASE_URL="https://yourappdomain.auth0.com"
AUTH0_CLIENT_ID=your-regular-app-client-id
AUTH0_CLIENT_SECRET=your-regular-app-client-secret
AUTH0_BASE_URL="http://localhost:3000"
AUTH0_SECRET=ede7edc615ee5a58c0791794f704981c

In Auth0, please ensure you created Regular Web App.  I also tried using SPA - it works.

Open up this page : https://manage.auth0.com/ and then select your application. Ensure "Allowed callback url" is configured to http://localhost:3000/api/auth/callback

Also ensure "Allowed logout url" is configured to http://localhost:3000

Save your changes and your app should be good to go.
















Comments

Popular posts from this blog

gemini cli getting file not defined error

NodeJS: Error: spawn EINVAL in window for node version 20.20 and 18.20

vllm : Failed to infer device type