Digital Anumati
Answeredcookies
Hot

How do I persist consent state across subdomains?

Asked 5 Sept 20261.8k viewsby Rohan Mehta
Score
42
Hot3 replies
We have `app.example.com` and `www.example.com`. When a user accepts cookies on one, we want that to apply to the other. Setting a cookie on `.example.com` seems to work in Chrome but Safari drops it. Any known workaround using Digital Anumati's SDK?
42votes3answers1.8kviews
You
  • Priya Iyer
    Priya Iyer

    Also seeing this on Firefox with strict tracking protection on.

    23d ago

3 Answers

Resolved
Sorted byVotes
58
Accepted Answer
Safari's ITP treats cross-subdomain cookies as third-party in some flows. The pattern that works: call `consent.sync({ scope: 'org' })` from the SDK on both origins so state syncs via the org-level API instead of relying on the browser cookie. Docs: /developers/consent-sync.
You
  • Rohan Mehta
    Rohan Mehta

    This worked. Thanks for the pointer to /developers/consent-sync.

    23d ago
  • Kabir Nair
    Kabir Nair

    Confirming this also fixed our Safari private-mode issue after enabling `allowAcrossOrigins`.

    23d ago
12
As a workaround we set `SameSite=None; Secure` and it fixed Safari 17+ for us. Still fails on private-mode though.
You

No comments yet

Be the first to share your thoughts.

5
Accepting u1's answer — the org-level sync is the clean fix, cookie tricks are a dead-end long term.
You

No comments yet

Be the first to share your thoughts.

Your Answer

0 characters