wasp-lang / wasp

The fastest way to develop full-stack web apps with React & Node.js.
https://wasp-lang.dev
MIT License
13.48k stars 1.18k forks source link

Session ID is removed unexpectedly #2075

Open dyon21 opened 4 months ago

dyon21 commented 4 months ago

Describe the bug Unable to maintain login when opening multiple pages before logging in. Wasp keeps polling /auth/me with stale/empty sessionId and removing new ones

To Reproduce Steps to reproduce the behavior:

  1. Open two pages before logging in
  2. Login on one of them
  3. Wait and the unlogged page will request /auth/me with empty sessionId, resulting in a 401 error, which then removes the sessionId saved by the other page
  4. Consequently, you will be logged out

Expected behavior Always use the new ID to maintain the login status.

Martinsos commented 3 months ago

Thanks for reporting this @dyon21 ! We will be looking into it.