react-use-googlelogin
react-use-googlelogin copied to clipboard
Integrate own `localStorage` instead of relying only on Google's `sessionStorage`.
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
accessTokensare not stored insessionStorageandgapiprovides 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.