Conversation

Nerd-puzzle: how might I allow sibling same-origin iframes to communicate, given… - parent is cross-origin - can’t execute JS on parent - no sessionStorage, localStorage, cookies, or IDB access - with enough security to share auth tokens?
7
1
19
Replying to
A concrete instantiation of the problem: imagine a page has three YouTube embeds and these security constraints. The user signs into YouTube via UI in one embed. You’d like the other embeds to also become signed in.
2
This question brought to you by: why do Chrome and Firefox disable access to *session* storage when third-party cookies are disabled? It’s not even persistent! What’s the threat model? Bluh.
2
4
Nice approach! Alas, defining a secret via a common property is very not ideal—it would be like asking YouTube users to add a custom parameter every time they embed, rather than just copying-and-pasting—but it’s better than nothing!
Replying to
Best I can think of... make the login process a popup-based OAuth flow. Upon successful login, use the WebSocket trick to make all the frames _look_ logged in, but don't display any PII — just public profile information. This can be attacked, but it doesn't matter.
1
When another iframe wants to perform an authenticated action, it also does a one-time OAuth popup which closes immediately and passes the access token back to the iframe. Terrible UX on a mobile browser but I think it would work.