vue-google-auth
vue-google-auth copied to clipboard
Refresh token
Since the token is only valid for 1 hour it would be nice to include an option or perhaps by default reload expired tokens in exchange for fresh ones. I'm not entirely sure how to best implement this but this is what I'm testing out in my app:
setInterval(() => {
window.gapi.auth2.getAuthInstance().currentUser.get().reloadAuthResponse().then((authRes) => {
console.log('refreshing token')
// app logic...
}, 3600000)
I'd be willing to take a look at it after I see that it works and open a PR later