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

[Angular 4 app] - IE 11 intermittently returning NULL in the redirectURL #330

Closed
smehra711 opened this issue Jun 19, 2018 · 7 comments
Closed

Comments

@smehra711
Copy link

We have developed a Single page application in Angular 4. Our first screen is Login Screen where we are using MSAL.js library to authenticate username/password. We are facing two intermittent issues in IE 11 browser only while authenticating username/password using Microsoft Authentication Library(MSAL.js) and due to which we see blank screen sometimes. [Note: In other browsers like chrome and safari, the functionality works as expected.]

Issue 1: IE 11 intermittently returning NULL in the redirect URL For ex: https://domain-name/null

Steps to reproduce the issue:

  1. In my App, when clicking on login button from home page, it calls msal.js login function which redirects to this link https://login.microsoftonline.com/.......
  2. Microsoft library (msal.js) after authenticating username and password information, should come back to the login screen from where it started but it is going to https://domain-name/null
  3. Null stays there for a second and then it stop showing at the end of the URL, and the browser screen is blank. Now if I refresh the browser, it opens https://domain-name/home/login

Issue 2: In IE 11, sometimes after authenticating username and password, redirect URL is incorrect:

for example this is the login URL:: https://domain-name/home/login
But after authentication it redirects to: https://domain-name/home

@smehra711
Copy link
Author

any update?

@nehaagrawal
Copy link
Contributor

@smehra711 Ths is an existing issue with the Edge and IE browsers. We have documented this in our ADAL library but this applies here as well. Currently, we only have the work around listed here: https://github.com/AzureAD/azure-activedirectory-library-for-js/wiki/Known-issues-on-Edge#issues

To give you some context since the session/local storage is cleared during the redirect in IE/Edge and the MSAL stores the url of the page where user started in browser cache. Now since the cache is cleared, MSAL is unable to recreate the url where user started after the login is done and is appending null.

One workaround is to set NavigateToLoginRequestUrl flag to false in MSAL config. By default this flag is true. If you do this then user wouldn't be redirected to the page where he/she started but in the callback, you can reset the browser location to your desired url using window.location.href.

Please let me know if you are still facing issues.

@jkga
Copy link

jkga commented Jul 4, 2018

@smehra711

[Note: In other browsers like chrome and safari, the functionality works as expected.]

based on my own experience, intermittently returning NULL is also happening even in chrome browser not just IE. If you get redirected to MS login page and waited for a minute, you will notice that after successfully logging in you will be redirected to https://your-domain/null

@smehra711
Copy link
Author

After adding redirectURi and setting NavigateToLoginRequestUrl flag to false in MSAL config, it fixed the IE 11 null issue. Thank you so much for your help on this But I am having another issue now on Window 7 with IE 11.0.9600 version.

{
redirectUri: this.redirectUri,
navigateToLoginRequestUrl: false

    }

 The issue is from login screen when I call msal login function, it redirects back to the url with # sign. This is happening only on Window 7 with IE 11.0.9600 version

https://domain-name/home/login#

Can you please help us solving this issue, we have a big team using Window 7 with IE 11.0.9600 version.

@smehra711
Copy link
Author

smehra711 commented Jul 10, 2018 via email

@nehaagrawal
Copy link
Contributor

duplicate of #347. Please track this issue there.

@nehaagrawal
Copy link
Contributor

@smehra711 @jkga This is fixed and released in MSAL 0.2.2. Please check release notes for more details.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 5, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants