Skip to content

Conversation

Rich-Harris
Copy link
Member

working on this so that I can properly review #275. It turns out that the staging db was paused, which was the root of #267, but beyond that the login flow seems broken because the child window (that opens when you click 'log in') tries to communicate with window.opener which isn't possible. Not sure if that's a new thing caused by cross-origin isolation.

Anyway we don't need direct window-to-window communication, we can hack around it with storage events. As soon as the child window is sent back to /auth/callback, we set a value in localStorage that the parent window is listening for; once it updates, we call invalidateAll and the child window closes.

Copy link

vercel bot commented Oct 8, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
omnisite ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 8, 2024 1:44am

@Rich-Harris Rich-Harris merged commit dffdeb6 into main Oct 8, 2024
3 checks passed
@Rich-Harris Rich-Harris deleted the fix-login branch October 8, 2024 02:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant