Skip to content
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

Feature request: Support session cookies with "Partitioned" #2179

Open
nchaigne opened this issue May 14, 2024 · 5 comments · May be fixed by #2196
Open

Feature request: Support session cookies with "Partitioned" #2179

nchaigne opened this issue May 14, 2024 · 5 comments · May be fixed by #2196

Comments

@nchaigne
Copy link

Third-party cookies will "soon" be phased out.
As seen in Firefox console for example:

Cookie "mojolicious" will soon be rejected because it is foreign and does not have the "Partitioned" attribute.

I would like Mojolicious to support "Partitioned" session cookies, so we can keep using session cookies with CORS.

Thank you for considering this.

@kraih
Copy link
Member

kraih commented May 14, 2024

Without a spec this seems unlikely to happen.

@nchaigne
Copy link
Author

What do you mean ?
Do I need to specify how to do this ? or do we need an official spec from Mozilla / Google ?

@Skeeve
Copy link

Skeeve commented Jun 25, 2024

Without a spec this seems unlikely to happen.

Here are the specs: https://developer.mozilla.org/en-US/docs/Web/Privacy/Privacy_sandbox/Partitioned_cookies

@nchaigne e this is what I did:

                my $partitioned = $app->sessions->cookie_path;
                $partitioned =~ s/(?:; Partitioned)*$/; Partitioned/;
                $app->sessions->cookie_path($partitioned);

As the path parameter of cookie_path is not checked, it works.

Maybe this would be better?

                my $partitioned = $app->sessions->cookie_path;
                if (not $partitioned =~/; Partitioned(;|$)/) {
                    $app->sessions->cookie_path($partitioned . '; Partitioned');
                }

@kraih
Copy link
Member

kraih commented Jul 20, 2024

Gives current browser support, i'd be in favour of this feature.

@Skeeve
Copy link

Skeeve commented Jul 22, 2024

Gives current browser support, i'd be in favour of this feature.

You mean like this?

https://developer.mozilla.org/en-US/docs/Web/Privacy/Privacy_sandbox/Partitioned_cookies#browser_compatibility

@rawleyfowler rawleyfowler linked a pull request Aug 28, 2024 that will close this issue
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 a pull request may close this issue.

3 participants