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

Window closes itself when it's not actually a popup #172

Open
tw-sarah opened this issue Jul 24, 2023 · 0 comments
Open

Window closes itself when it's not actually a popup #172

tw-sarah opened this issue Jul 24, 2023 · 0 comments

Comments

@tw-sarah
Copy link

Hello,

We have an app that serves as a dashboard to open other apps in separate browser tabs, and those apps that we open use your library. As soon as they complete auth, the new window closes itself.

I can see this is happening because the code linked below closes the current window if it thinks it's a popup.

window.close();

The problem for us is that you are determining if it's a popup based on if it's the top window, opened by another window, and it is a named window.

export function isInPopUp() {

For us, we are opening the app that uses your library, so even though they are not doing the auth in a popup, your app thinks it's a popup and closes the window. Would it be possible for you to try to identify if the auth was done in a popup in a more specific way, like with a particular window name that matches the config, or something else?

Due of this behavior, we are not able to name the windows we open, which means if someone clicks on our links more than once they open a bunch of duplicate windows, when we could send them to the existing one if we could used named windows.

Thanks for your consideration.

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

No branches or pull requests

1 participant