Skip to content
This repository has been archived by the owner. It is now read-only.

Conversation

@navyasric
Copy link
Contributor

No description provided.

Prithvi Kanherkar and others added 6 commits September 18, 2018 10:17
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.
@navyasric
Copy link
Contributor Author

@pkanher617 The sample worked on most browsers. But, on IE, after sign in the MS Graph response JSON is not getting displayed.
I also made a few other comments.
CC: @manoj-rath @andretms Also requesting your reviews.

//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"});
Copy link
Contributor Author

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.

Copy link
Contributor Author

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.

@navyasric navyasric merged commit f1e79f7 into quickstart Sep 19, 2018
@navyasric navyasric deleted the prkanher/IELoginRedirect branch September 24, 2018 23:54
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants