Built-in auto token refresh

robsontenorio
0
robsontenorio
commented 9 months ago

What problem does this feature solve?

Automatically refresh the "token" if it expires, because some Oauth providers has a short token TTL.

What does the proposed changes look like?

Once https://github.com/nuxt-community/auth-module/pull/145 has been accepted, I will propose a PR to auto refresh the "token" if it has been expired.

@pi0 @breakingrobot where place it? Maybe lib/core/auth.js?

mounted () {
    // handle token expiration        
    if (this.strategy.options.auto_refresh_token === true) {
      this.watchTokenExpiration()
    }
}
idea
0
jonasgrosch
0
jonasgrosch
commented 9 months ago

@robsontenorio Really looking forward to this. Any idea when you'll have time for the PR?

0
robsontenorio
0
robsontenorio
commented 9 months ago

Just waiting another PR be merged.

0
sobolevn
11
sobolevn
commented 6 months ago

@robsontenorio any progress on the issue? I am trying to solve the same problem.

0
robsontenorio
0
robsontenorio
commented 6 months ago

It seem was not well received. Just waiting a response.

0
abondarenko
0
abondarenko
commented a month ago

Any news on this?

0
robsontenorio
0
robsontenorio
commented a month ago

There was some tries in the past, but mantainers does not reviewed it. The code base from PRs is deprecated now.

0
niklasravnsborg
0
niklasravnsborg
commented 9 days ago

What is the current approach of most people to solve this? I also need this functionality.

0
Informations
Feature Request โ€ข Open
#c109 - Created 9 months ago