Skip to content

Conversation

@ndelanou
Copy link

@ndelanou ndelanou commented Oct 7, 2025

Closes #55

The current logic handling persistSession is wrong: (isSession && persistSession) || (persistSession && !cookie.isExpired())

With persistSession to true (default behavior), cookies are saved if they are either a session cookie (max-age == null && expires == null) or not expired. Works perfectly ✅

When persistSession is false, every cookie is rejected. This is a huge issue ⚠️

I changed the logic in charge of filtering the cookies to be saved.

I also added some tests covering this fix.

@ndelanou ndelanou force-pushed the fix/persist-session branch from cbe9c89 to 491fab2 Compare October 7, 2025 14:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Non-session Cookies won't saved without persistSession flag

1 participant