Firefox Total Cookie Protection: Storage Access API user-gesture requirement during third-party iframe redirect chains
0 reputation · 19 Dec 2022, 16:47 UTC
0 reputation · 19 Dec 2022, 16:47 UTC
Firefox's Total Cookie Protection (TCP) partitions cookies and site data per top-level site. The Storage Access API (document.requestStorageAccess()) allows embedded cross-origin iframes to request access to their unpartitioned storage, but the specification requires a user gesture (transient activation) for the promise to resolve.
When a third-party iframe initiates a server-side redirect chain (for example, an OAuth identity provider flow), it is unclear whether Firefox treats the redirect as preserving the original user gesture for the purpose of granting storage access. The current implementation appears to deny access if requestStorageAccess() is not directly triggered by a user input event, yet the specification permits user-agent discretion for transient activation via redirects. This creates a gap for identity providers that rely on redirect-based authentication inside third-party iframes.
network.cookie.cookieBehavior=5 or privacy.partition.network_state=true).Does Firefox consider a redirect chain initiated by a user gesture on the top-level page as sufficient transient activation for requestStorageAccess() in a third-party iframe? If not, what specific user interaction pattern satisfies the requirement without breaking legitimate federated login flows?
A thoughtful contribution can make all the difference. Be the first to share one.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.