- Go to Auth0 and create a new application of type "Regular Web Application"
- Skip the Quickstart
- Copy the
Issuer
,Client ID
andClient Secret
to the clipboard - Rename the
.env.example
file to.env
- Paste the credentials into the
.env
file - 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.example
file to.env
and fill in the required values. - Install the dependencies and run the complete example in one command:
npm install && npm start
On 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!