WICG / first-party-sets

https://wicg.github.io/first-party-sets/
293 stars 75 forks source link

CHIPS Integration for two websites under same organisation #199

Closed spandilla34 closed 10 months ago

spandilla34 commented 11 months ago

Hello Team, I have a scenario on webiste where I will be dropping a cookie on one domain and read it on other domain. I am confused on which is the best way to integrate this with third party cookie role out

My Scenario:

  1. I visit abc.com,
  2. I am dropping an frame from yyy.xyz.com and this will drop a cookie with name "mycookie" as domain name as xyz.com
  3. Now when I redirected to xyz.com, I am not able to see that cookie
  4. But when i redirected to yyy.xyz.com, I am able to see the cookie

Both abc.com and xyz.com comes under same company

I have tried adding the partitioned option while dropping the cookie but when I redirected to xyz.com, I am not able to see that cookie at all. In this case should I use the related websites sets? If yes, could you provide me an example and how to do that?

cfredric commented 10 months ago

Hi @spandilla34,

Since abc.com and xyz.com are both under the control of the same company, Related Website Sets would work for your use case. It would allow your yyy.xyz.com iframe to call document.requestStorageAccess() and then set an unpartitioned cookie, which would be accessible when later visiting xyz.com directly.

Please check out https://developers.google.com/privacy-sandbox/3pcd/related-website-sets-integration for more detailed information, and see https://related-website-sets.glitch.me/ for a demo.