vvo/iron-session

Support the `partitioned` attribute in cookie settings

dysbulic opened this issue · 1 comments

Google Chrome is in the process of phasing out third-party cookies.

There are a couple alternatives, one of the simplest being CHIPS: Cookies Having Independent Partitioned State which is triggered by the addition of a Partitioned attribute in the cookie header.

The documentation gives the following as an example compliant cookie:

Set-Cookie: __Host-name=value; Secure; Path=/; SameSite=None; Partitioned;

iron-session should support setting this attribute.

Actually, as I dig deeper, I find that the serialization of the cookie is handled by the cookies library which has support for partitioned as of the latest version.

For some reason the attribute doesn't work when specified in my cookieOptions when imported into Deno from https://esm.sh/iron-session@8.0.1 even though it imports the most recent version of cookies.

I have gotten it to set though on the example app included with iron-session.