expressjs / session

Simple session middleware for Express
MIT License
6.26k stars 979 forks source link

Add "Partitioned" option to cookies #966

Closed alexop1000 closed 9 months ago

alexop1000 commented 11 months ago

closes #961

cattermo commented 10 months ago

@dougwilson Can we please merge and release this 🙏

kaulsh commented 10 months ago

+1

sergioRozenszajn commented 10 months ago

Hi, While discussing this flow we have been requested that the partition property addition would be agent dependent. This requirement comes because some old browsers/browser versions might break if an un-expected cookie property is provided. We have tried to modify the JSession cookie dynamically, after it was generated, with no success. Express-session will then generate another cookie. Would you consider to support a more dynamic behavior? --> for example to provide a callback function to modify JSessionID cookie properties on cookie creation.

kaulsh commented 10 months ago

Would you consider to support a more dynamic behavior? --> for example to provide a callback function to modify JSessionID cookie properties on cookie creation.

Can we also get an explicit way to set this particular cookie like it is done in this PR? Not everyone may want to do a UA check.