Auth-module: Get access token and refresh token after login endpoint

Created on 5 Sep 2019  路  5Comments  路  Source: nuxt-community/auth-module

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 question is available on Nuxt community (#c410)
question

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

All 5 comments

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

amjadkhan896 picture amjadkhan896  路  3Comments

essamamdani picture essamamdani  路  3Comments

pi0 picture pi0  路  3Comments

DiegoGallegos4 picture DiegoGallegos4  路  3Comments

nilskoppelmann picture nilskoppelmann  路  3Comments