This is a example of Auth0 integration with Nuxt.js
- Using Auth0 Lock
- Update tokens with checkSession method
- Secure / Non-Secure Pages with middleware
- Showing User from JSON Web Token
Need to create a auth0 tenant and make some settings below.
- Allowed Callback URLs: http://localhost:3000/user/callback
- Allowed Web Origins: http://localhost:3000
- Allowed Logout URLs: http://localhost:3000
Using dotenv. create .env and set clientID and domain.
AUTH0_CLIENT_ID=YOUR_CLIENT_ID
AUTH0_DOMAIN=YOUR_DOMAIN
Let's start with Nuxt.js build commands.
$ yarn install
$ yarn dev