You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Cancel background traffic before login/register so session cookie isn't clobbered
When handle_user_login invalidates the previous anonymous session and a
concurrent request using the old cookie is still in flight, the server
creates a *new* anonymous session for it and responds with a fresh
`Set-Cookie: galaxysession=<anon>`. If that response lands between the
login POST and the full-page navigation, the browser navigates with the
anonymous cookie and the new page loads logged out. Under the TEMP SSE
flag this happens often enough to trip `wait_for_logged_in` in selenium.
Fix: synchronously close all long-lived connections (SSE, polling
watchers) and rotate a shared axios AbortController before sending the
login/register POST. With no in-flight anonymous-cookie request, the
server can't emit the clobbering Set-Cookie, and the authenticated
cookie survives until navigation.
0 commit comments