This repository has been archived by the owner. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 49
Prkanher/ie login redirect #5
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Adding functionality to detect whether browser is IE or Edge. If it is detected to be one of those broswers, it will force loginRedirect, otherwise it will use loginPopup.
Refactored signIn and acquireToken calls to be more concise, kept the function signature more similar to the quickstart that has been released.
…ious commit) Replacing the test client id with a generic variable, adding the storeAuthStateInCookie flag for the UserAgentApplication for IE fix (added in the previous commit, but logs do not reflect it)
Redirect and popup code is now separated
Update port required per quickstart app registration.
042fb97 to
1fbe10f
Compare
Contributor
Author
|
@pkanher617 The sample worked on most browsers. But, on IE, after sign in the MS Graph response JSON is not getting displayed. |
navyasric
commented
Sep 19, 2018
JavaScriptSPA/index.html
Outdated
| //Pass null for default authority (https://login.microsoftonline.com/common) and tokenReceivedCallback if using popup apis | ||
| var myMSALObj = new Msal.UserAgentApplication(applicationConfig.clientID, null, null); | ||
|
|
||
| var myMSALObj = new Msal.UserAgentApplication(applicationConfig.clientID, null, null, {storeAuthStateInCookie:true, cacheLocation:"localStorage"}); |
Contributor
Author
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.
I don't think we want to set the storeAuthStateInCookie and cacheLocation by default. This should only be necessary for those who use Edge and is documented in the wiki.
Contributor
Author
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.
Per @andretms , we need to set redirectURI to location.origin for it to work in VS project.
…amples/active-directory-javascript-graphapi-v2 into prkanher/IELoginRedirect
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.