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
If this issue only occurs in one browser, which browser is a problem?
No response
Describe the Bug
Session regeneration is currently non functional - the current code deletes the #sessionID property to indicate that the existing session id is deleted:
Astro Info
If this issue only occurs in one browser, which browser is a problem?
No response
Describe the Bug
Session regeneration is currently non functional - the current code deletes the
#sessionID
property to indicate that the existing session id is deleted:astro/packages/astro/src/core/session.ts
Line 185 in ebe2aa9
But then it uses
#ensureSessionID()
to generate a new one, which doesn't check that private property, but instead checks the cookie directly:astro/packages/astro/src/core/session.ts
Line 360 in ebe2aa9
If a session exists, this check will always succeed, leading to the session ID not changing.
I believe this is fixable by removing the call to
#ensureSessionID
and replacing this line:astro/packages/astro/src/core/session.ts
Line 185 in ebe2aa9
with a direct regeneration, i.e.
this.#sessionID = crypto.randomUUID();
What's the expected result?
The session id should change.
Link to Minimal Reproducible Example
https://stackblitz.com/edit/github-muwk6ati-gxwf5xkb?file=src%2Fpages%2Findex.astro
Participation
The text was updated successfully, but these errors were encountered: