react-use-googlelogin icon indicating copy to clipboard operation
react-use-googlelogin copied to clipboard

Integrate own `localStorage` instead of relying only on Google's `sessionStorage`.

Open asyarb opened this issue 5 years ago • 0 comments

Right now, this library relies on the values that Google automatically stores in sessionStorage to persist the user on page refresh, but this comes with some undesirable limitations:

  • The active logged in user isn't persisted across tabs
  • Closing the tab logs you out
  • Refreshed accessTokens are not stored in sessionStorage and gapi provides no way to update them. A page refresh effectively wipes out any refreshed tokens.

There is a way to persist the user yourself in localStorage in userland, but it would be ideal if we could automate this behind the same persist flag.

asyarb avatar May 19 '20 20:05 asyarb