-
-
Notifications
You must be signed in to change notification settings - Fork 978
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't set partitioned cookie even though I updated all of the package #972
Comments
@HoneyMeat express is using cookie version 0.5.0 internally, which discards the partitioned option. You can manually build your cookie and set your response header. For that you have to use cookie 0.6.0 as a dependency: import { serialize } from 'cookie';
const cookie = serialize('myCookieName', 'mySessionId', {
httpOnly: true,
sameSite: 'none',
secure: true,
partitioned: true,
path: '/',
});
return res.setHeader('Set-Cookie', cookie).status(200).send(); |
Same problem over here. Updated express package to 4.19.0 and express-session to 1.18.0, both have 0.6.0 version of the
Any tips on this?? |
@JoseAlbertoVazq if you check with developer tools, what do you see on your response headers, the response which sets the cookie? |
@JoseAlbertoVazq If you are checking the dev tools on a different domain than which the cookie is set, your cookie
|
The cookie is always shown but when I set the Partitioned attribute, and it always was like that, I'm running it on the same domain (on local, and on staging, but those are two different tests local --> local and staging --> staging) |
Okay so I found the solution for my case. I am also using Make sure to add this to your package.json npm:
yarn:
Also, ensure that the Now it's working for me !! |
I'm using express-session:
I updated all of the packages, including express-session and cookie, but the partitioned attribute is not being recognized and is not being set. What should I do?
The text was updated successfully, but these errors were encountered: