-
Notifications
You must be signed in to change notification settings - Fork 364
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
[SDK-1395] Refactor loginWithPopup to optionally accept an existing popup window #368
Conversation
worked for me on Android, had no opportunity to test on iOS due to lack of device. But since @charsleysa mentioned doing it this way in his patch I would guess it should work as well. |
@zewa666 Thanks for looking. Can you confirm that it solves your original problem of opening the popup window without the need for a |
@stevehobbsdev sorry for being unclear. Yes I've reverted my changes, checked out your branch in my cloned repo, ran |
Thanks @zewa666 ! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
for use with iOS to open a popup, similar to loginWithPopup. refer to auth0/auth0-spa-js#368 for additional details
for use with iOS to open a popup, similar to loginWithPopup. refer to auth0/auth0-spa-js#368 for additional details
for use with iOS to open a popup, similar to loginWithPopup. refer to auth0/auth0-spa-js#368 for additional details
Description
This PR adds a new option to
loginWithPopup
that would allow the developer to pass an existing popup window to be used instead of the SDK creating its own. This allows the popup to work better in scenarios like on iOS where the popup should be opened inside a button click handler without any async wrappers.It also allows us to fix an issue where the popup sometimes doesn't work properly inside a PWA. The existing logic creates the pop window and then sets the URL, whereas now in this PR those two steps are unified.
References
Closes #300
Testing
Manually tested by adding a new button to the playground that allows a popup window to be specified when calling
loginWithPopup
. Unit tests have also been added.Checklist
master