Hi,
Firstly, thank you for detailed documentary of auth module!
But I can't find the solution of my problem
I want to get 'access token' and 'refresh token' after i login endpoints
Something like this:
auth: {
strategies: {
local: {
endpoints: {
login: { url: '/api/auth/login', method: 'post', propertyName: 'token.access', refrshToken:'token.refresh'},
user: { url: '/api/auth/user', method: 'get' },
logout: { url: '/api/auth/logout', method: 'post' }
},
refreshToken: true
}
}
},
and result in:
This issue as been imported as question since it does not respect auth-module issue template. Only bug reports and feature requests stays open to reduce maintainers workload.
If your issue is not a question, please mention the repo admin or moderator to change its type and it will be re-opened automatically.
Your question is available at https://cmty.app/nuxt/auth-module/issues/c410.
Hi @Ned452 ! We are working on refresh support for local strategy. It's not finished yet, but at the meantime you can use the new branch (feat/refresh).
Docs and more details can be found at #361
@JoaoPedroAS51, Thank you!
@JoaoPedroAS51 Would the refresh support for local strategy be the same for oauth2 with grant_type authorization_code?
Hi @cardaddy ! I don't think it works on OAuth2 out of the box, because it doesn't match OAuth2 requirements. But we want to improve the system to support OAuth2. I let you know as soon as we support it.
Most helpful comment
Hi @Ned452 ! We are working on refresh support for local strategy. It's not finished yet, but at the meantime you can use the new branch (feat/refresh).
Docs and more details can be found at #361