Dev v5
When I install the modules from the dev branch, I put this one in my package.json and I run npm i
"@nuxtjs/auth": "github:nuxt-community/auth-module#dev"
In my nuxt.config.js. I put :


Do you have an idea ?
Hi @Calion54 It is because we migrated to typescript. Will add CI/CD script to publish nightly versions
Hi @pi0 thanks for you answer. Do you have a date for it to be operational?
install #ab927f6557124802003f87a8c5da9af905ea94bd instead of #dev
ex:
yarn add nuxt-community/auth-module\#ab927f6557124802003f87a8c5da9af905ea94bd
Thanks you so much @menthol. I will use this version for now.
Hey guys! Now dev branch can be installed using @nuxtjs/auth-next :)
i get this error now =(
Template src not found: /home/radu/Desktop/logintest/node_modules/@nuxtjs/auth-next/templates/plugin.js
Solved. ;)
Hi guys, I'm getting the following error when trying to load from dev.
✖ Nuxt Fatal Error │
│ │
│ Error: Module `@nuxtjs/auth-next` not found. Please ensure `@nuxtjs/auth-next` is in `dependencies` and installed.
I'm using
modules: [
'@nuxtjs/auth-next',
],
and
"dependencies": {
"@nuxtjs/auth-next": "github:nuxt-community/auth-module#dev",
}
thoughts?
Hi @cardaddy! This error is because you're setting to dev branch instead of a version. Use npm install @nuxtjs/auth-next --save or yarn add @nuxtjs/auth-next to get the latest version.
The latest version is 5.0.0-1588183208.61fb4dc
Hi @JoaoPedroAS51, I don't appear to be seeing the auth/core/ packages in the .nuxt folder, am I missing a step? I'm using modules @nuxtjs/auth-next`` along with the npm install. I see auth-next in node_modules along with the files nested within dist.
@cardaddy In v5 we don't copy core files to .nuxt anymore.
@JoaoPedroAS51 I guess that would explain why I can't find it. I'm trying to use this code, https://github.com/nuxt-community/auth-module/blob/dev/docs/schemes/oauth2.md however it doesn't appear to be in the current production version. Should I create a new issue?
You can use it. Are you trying to use oauth2 scheme or create a custom scheme that extends oauth2 scheme?
Can you show me your auth config?
oauth2. I needed the token refresh capability and when using the strategy below I was getting undefined with the endpoints in v4.9.1. After looking at the oauth module in v4.9.1 I didn't see the updated oauth2 code. I attempted using the dev version, but ran into a different issue where it's wants to set the grant type as implicit. Any suggestions?
``
auth: {
localStorage: false,
redirect: {
logout: '/signed-out',
home: '/portal/'
},
strategies: {
// local: false,
hri: {
scheme: 'oauth2',
endpoints: {
authorization: 'http://localhost:8080/portal/auth/oauth/authorize',
token:http://localhost:8080/portal/auth/oauth/token`,
userInfo: 'http://localhost:8080/portal/auth/api/users/me',
logout: 'https://example.com/logout'
},
token: {
property: 'access_token',
type: 'Bearer',
maxAge: 1800
},
refreshToken: {
property: 'refresh_token',
maxAge: 60 * 60 * 24 * 30
},
responseType: 'token',
grantType: 'authorization_code',
accessType: 'code',
redirectUri: process.env.BASE_URL + '/portal/login',
clientId: 'clientId',
scope: ['user_info'],
state: 'test',
}
}
},
middleware: ['auth'],
``
@JoaoPedroAS51 I was able to resolve my issues and get things working. Any time table when v5 will make it's way into a stable release? Also is there any sort of auto logout function with the oauth2 scheme? Thanks for the help.
Hi @cardaddy! I'm happy to know you were able to solve the issue! Can you tell me what happened? So I can help users with the same issue :)
We are working hard to release v5 as soon as possible. I can't tell you a date yet, but as soon as we release I let you know. We are currently working on PKCE support and Ky integration.
Oauth2 scheme don't have auto logout, but that's a good idea! I'll implement that. ;)
@JoaoPedroAS51 I had responseType set to token rather than code and our frontend developer had a bug in his security code on the landing page. Does localStorage do anything anymore? New configuration that works perfectly, see below.
auth: {
localStorage: false,
redirect: {
logout: '/signed-out',
home: '/portal/'
},
strategies: {
hri: {
scheme: 'oauth2',
endpoints: {
authorization: '/portal/auth/oauth/authorize',
token: `/portal/auth/oauth/token`,
userInfo: '/portal/auth/api/users/me',
},
redirectUri: process.env.BASE_URL + '/portal/login',
responseType: 'code',
grantType: 'authorization_code',
clientId: 'clientId',
scope: ['user_info'],
state: 'test'
}
}
},
Any issues using the dev version in a prod env now? We just really need to refresh token.
Auto logout would be really nice when the refresh token expires. That would be a great addition.
Thanks for all your work.
@cardaddy Thanks!
We sync storage data between localStorage and cookies. But it's optional.
Cookies are required for SSR projects as we can't access localStorage in Server Side.
localStorage is mostly used for SPA projects that don't want cookies.
I didn't test the latest versions in prod env yet. I'll make some test soon and let you know.
@JoaoPedroAS51 keep me posted on the auto logout feature as well. Thank you!
@cardaddy Just opened the PR #657 😉
@cardaddy Auto logout has been merged. You can update the package :)
@JoaoPedroAS51 you are the man! Thanks so much!
Most helpful comment
Hey guys! Now dev branch can be installed using
@nuxtjs/auth-next:)