Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Google provider doesn't persist token, socialUser is lost on browser refresh #747

Closed
lwestfall opened this issue Jan 1, 2024 · 1 comment

Comments

@lwestfall
Copy link

GoogleLoginProvider should persist the token(s?) to localStorage, and try to get them on initialize so it can instantiate _socialUser when present.

The issue is that on browser refresh for a signed-in user, _socialUser will always be null unless the user signs back in (even if we persist the token outside of the provider). This defeats any possibility of refreshing the token after a refresh (which itself seems broken, see #745)

I can attempt a PR this week.

Details to work out (some are notes to self):

  • How to handle expired tokens (should it not instantiate _socialUser in this case?)
  • signOut should clear anything the provider persists
@lwestfall
Copy link
Author

Dupe of #741

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant