loginPoup does not honor redirectUri in the original tab, popup window shows redirectUri! #559
Labels
more-information-needed
Use this label when you are waiting on information from the issue creator
I'm submitting a...
Browser:
Library version
Library version: 0.2.4
Current behavior
I thought this might be related to #238, #190, #174 .
I'm running a react, SPA with a history router, etc. localStorage option.
When I login using popup, the popup login works fine. However, after logging in through the popup, the redirect from the redirectUri (specified in the AAD portal and in the options so they match and are allowed) is only used within the popup window, so suddenly the popup window now has my application running in it and the redirectUri is honored in the popup window but no the original tab. The popup window does not close automatically.
If I make set the redirectUri to match the launch tab's URI or do not set the redirectUri the popup window closes properly but there is no redirect, I am just returned my original SPA with no redirect.
When I set redirectUri to a URI that is not the popup launch URI and nagivateToLoginRequestUrl = false or true, I see the same behavior, the popup now shows the app at the redirectUri.
In fact, it seems that when I set redirectUri to a URI that is not the launch tab's URI, the popup never closes properly and the redirectUri is honored in the popup window itself. navigateToLoginRequestUrl does not seem to make a difference.
#190 says to have the UserAgentApplication instance in the target "URI". Since its a SPA and the SPA has the app instance used to launch the popup, its already there. Since no redirect occurs, I don't even have a chance to use the approach described in #174.
Right now, once I return successfully to the original URI (either don't specify the redirectUri or make it match), I initiate the redirect myself. This makes the redirectUri parameter ineffective.
Expected behavior
I would expect that the popup window closes once logged in and that the browser tab from which the popup was launched and the redirectUri is honored in original tab window.
Minimal reproduction of the problem with instructions
Write an app that sets the redirectUri as described above.
The text was updated successfully, but these errors were encountered: