Built-in auto token refresh

robsontenorio
0
robsontenorio
commented a year 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 a year ago

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

0
robsontenorio
0
robsontenorio
commented a year ago

Just waiting another PR be merged.

0
robsontenorio
0
robsontenorio
commented 10 months ago
0
sobolevn
11
sobolevn
commented 8 months ago

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

0
robsontenorio
0
robsontenorio
commented 8 months ago

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

0
abondarenko
0
abondarenko
commented 3 months ago

Any news on this?

0
robsontenorio
0
robsontenorio
commented 3 months 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 2 months ago

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

0
kvanska
0
kvanska
commented a month ago

we're using this workaround for now. https://github.com/nuxt-community/auth-module/pull/208#issuecomment-408293603.

would like to know if this project is moving forward anymore? there is some pull requests merged but for some reason there's no releases since a while.

0
Informations
Feature Request โ€ข Open
#c109 - Created a year ago