- Go to Auth0 and create a new application of type "Regular Web Application"
- Skip the Quickstart
- Copy the
Issuer,Client IDandClient Secretto the clipboard - Rename the
.env.examplefile to.env - Paste the credentials into the
.envfile - Set Allowed Callback URLs on Auth0's app settings dashboard to
http://localhost:9991/auth/cookie/callback/auth0 - Set Allowed Logout URLs on Auth0's app settings dashboard to
http://localhost:3000
- Copy the
.env.examplefile to.envand fill in the required values. - Install the dependencies and run the complete example in one command:
npm install && npm startOn the NextJS frontend, click the "Login" button. Once the login is complete, the Frontend will automatically fetch the data and inject the bearer token into the origin request.
Read the Docs.
Join us on Discord!