abacritt / angularx-social-login

Social login and authentication module for Angular 17
630 stars 388 forks source link

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

Closed lwestfall closed 6 months ago

lwestfall commented 6 months ago

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):

lwestfall commented 6 months ago

Dupe of #741