Skip to content

Conversation

@goshander
Copy link
Collaborator

@goshander goshander commented Sep 14, 2025

https://expressjs.com/en/api.html#res.clearCookie

Simple removal of explicit cookie parameters does not guarantee that all possible copies of a cookie will be deleted if those cookies were originally set with different parameters (such as path, domain, secure, or sameSite). This is highly dependent on browser behavior, so calling clearCookie multiple times with different option combinations is a common and recommended practice to ensure all potential copies are properly cleared.

@goshander goshander requested a review from jhoncool September 14, 2025 21:07
jhoncool
jhoncool previously approved these changes Sep 15, 2025
@goshander goshander merged commit ce17eba into main Sep 25, 2025
1 check passed
@goshander goshander deleted the fix-cookie-set-and-clear branch September 25, 2025 14:06
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.

3 participants