SohoHouse / nuxt-oauth

Simple OAuth2 integration for your Nuxt app
MIT License
122 stars 27 forks source link

How to refresh access token from client side? #34

Closed vroad closed 4 years ago

vroad commented 5 years ago

It seems that access token is refreshed only when the page is rendered on server side. How to manually refresh access token from client, so that I could get new one before expiration?

Even on server side, current code does not seem to get new token before expiration. It refreshes token after expiration. If you only have one second left before expiration, there is a chance of authentication failures.

Decipher commented 5 years ago

@vroad Did you ever come up with a solution?

samtgarson commented 4 years ago

Hey team, this was released in v2.5. You can send a request to /auth/refresh to refresh your session with the OAuth provider and get a new bearer token.