Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: close OAuth popup from parent #973

Merged
merged 1 commit into from
Sep 20, 2024
Merged

Conversation

dphilipson
Copy link
Contributor

@dphilipson dphilipson commented Sep 19, 2024

On iOS, a browser window can't close itself via window.close(): instead, it must be closed by the same context that called window.open to open it. This means that for iOS we cannot rely on the OAuth callback window to close itself in the popup-based flow. Instead, we'll have the parent close it upon receiving a message.


PR-Codex overview

This PR adds a line of code to close a popup window when bundle and orgId are present.

Detailed summary

  • Added popup?.close() to close the popup window when bundle and orgId are present.

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

On iOS, a browser window can't close itself via `window.close()`:
instead, it must be closed by the same context that called `window.open`
to open it. This means that for iOS we cannot rely on the OAuth callback
window to close itself in the popup-based flow. Instead, we'll have the
parent close it upon receiving a message.
Copy link

vercel bot commented Sep 19, 2024

You must have Developer access to commit code to Alchemy on Vercel. If you contact an administrator and receive Developer access, commit again to see your changes.

Learn more: https://vercel.com/docs/accounts/team-members-and-roles/access-roles#team-level-roles

@dphilipson dphilipson merged commit b67844c into main Sep 20, 2024
3 of 5 checks passed
@dphilipson dphilipson deleted the dp/close-popup-from-parent branch September 20, 2024 21:10
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.

2 participants