Google sessionId not persisting
I'm using a deferent client frontend, and I'm noticing that after signing in with google, the user is able to login in fine but immediately gets logged back out (since there's no sessionId stored)
not sure what additional information I can provide to help back this question.

3 Replies
Hi @ayo. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
----------------------
Based on the information provided in the knowledge sources, it seems that there might be a few potential reasons for the issue you're experiencing with Google authentication and session persistence. However, I don't have enough specific information about your setup to pinpoint the exact cause. Let me share some relevant insights that might help:
1. Session Storage: Wasp uses a
Session
entity to store user session information and keep users logged in between page refreshes. If this isn't working correctly, it could cause immediate logouts. Auth Entities
2. Multiple Tabs Behavior: There's a known issue in Wasp where having multiple tabs open can cause unexpected logout behavior. This is related to how authentication tokens are handled across tabs. Github Issue: Revisit auth token clearing behavior
3. Social Auth Flow: There was a reported issue with the social auth flow in development mode due to React 18's StrictMode causing double rendering. This could potentially cause problems with token validation. Github Issue: Social login callback page sends the token twice
4. Custom Frontend: Since you mentioned using a different client frontend, it's possible that the integration with Wasp's authentication system isn't fully compatible or properly implemented.
To troubleshoot this issue, you might want to:
- Ensure that your Google OAuth app is correctly set up with the proper redirect URIs.
- Check if the issue persists in a production build (if you're currently in development mode).
- Verify that your custom frontend is correctly handling the authentication flow and token storage as expected by Wasp.
- Look into implementing the two-cookie solution mentioned in the GitHub discussions to improve session management. Github Issue: Should we use sessions instead of JWT
If the problem persists, you may need to provide more details about your specific implementation, including how you've set up Google authentication in your Wasp file and how your custom frontend is interacting with Wasp's authentication system.
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------
Sorry @ayo, I seem to be having a bit of trouble. Don't worry though, I've pinged my support and they will try to fix me up! :technologist:
Perhaps try again in 15mins?this seems to be a problem with just safari. So all good!
Hey, could you explain
deferent client frontend
, what is that? 🙂
Could you help us to reproduce this issue even if it happens only in Safari? 😄