Skip to content

Commit 47f0448

Browse files
committed
upgrade to @nuxtjs/auth-next v5 + dependency updates
Provide a working example for the recommended version v5 🔥 Check https://auth.nuxtjs.org/providers/auth0
1 parent 765b858 commit 47f0448

File tree

5 files changed

+2057
-1793
lines changed

5 files changed

+2057
-1793
lines changed

.env.example

+1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
AUTH0_CLIENT_ID=""
22
AUTH0_DOMAIN=""
3+
AUTH0_AUDIENCE=""

README.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,12 @@ You can access a simple demo here: https://auth0.nuxtjs.org
88

99
## Setup
1010

11-
* Create an account at Auth0 (https://auth0.com)
12-
* Add your endpoints to your client's allowed urls like this ![nuxt-callbacks](https://cloud.githubusercontent.com/assets/904724/22703633/23f35724-ed65-11e6-83e4-227ad77c00ff.png)
13-
* Add your logout endpoint to your account allowed urls like this ![nuxt-logout-cb](https://cloud.githubusercontent.com/assets/904724/22703768/9782bbbc-ed65-11e6-93b7-9c1e4d5d7984.png)
11+
- Create an account at Auth0 (https://auth0.com)
12+
- Add your endpoints to your client's allowed urls like this ![nuxt-callbacks](https://cloud.githubusercontent.com/assets/904724/22703633/23f35724-ed65-11e6-83e4-227ad77c00ff.png)
13+
- Add your logout endpoint to your account allowed urls like this ![nuxt-logout-cb](https://cloud.githubusercontent.com/assets/904724/22703768/9782bbbc-ed65-11e6-93b7-9c1e4d5d7984.png)
1414

15-
* Copy the file `.env.example` at the root folder, rename it as `.env` and add your Auth0 keys
15+
- Copy the file `.env.example` at the root folder, rename it as `.env` and add your Auth0 keys
16+
- Find the audience value at https://manage.auth0.com/#/apis
1617

1718
## Running Locally
1819

@@ -22,4 +23,3 @@ cd example-auth0
2223
npm install
2324
npm run dev
2425
```
25-

nuxt.config.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,10 @@ export default {
3737
callback: '/auth/signed-in'
3838
},
3939
strategies: {
40-
local: false,
4140
auth0: {
4241
domain: process.env.AUTH0_DOMAIN,
43-
client_id: process.env.AUTH0_CLIENT_ID
42+
clientId: process.env.AUTH0_CLIENT_ID,
43+
audience: process.env.AUTH0_AUDIENCE
4444
}
4545
}
4646
},

package.json

+5-5
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@
1010
"start": "nuxt-start"
1111
},
1212
"dependencies": {
13-
"@nuxtjs/auth": "^4.9.1",
14-
"@nuxtjs/axios": "^5.12.2",
15-
"dotenv": "^8.2.0",
13+
"@nuxtjs/auth-next": "^5.0.0-1622918202.e815752",
14+
"@nuxtjs/axios": "^5.13.6",
15+
"dotenv": "^10.0.0",
1616
"normalize.css": "^8.0.1",
17-
"nuxt-start": "^2.14.3"
17+
"nuxt-start": "^2.15.6"
1818
},
1919
"devDependencies": {
20-
"nuxt": "^2.14.3"
20+
"nuxt": "^2.15.6"
2121
}
2222
}

0 commit comments

Comments
 (0)