Skip to content

Refresh token #4

Description

@robinandeer

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions