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

[msal-browser] Add pattern for login on page-load #1543

Merged
merged 5 commits into from Apr 27, 2020

Conversation

pkanher617
Copy link
Contributor

@pkanher617 pkanher617 commented Apr 24, 2020

This PR fixes an issue raised in #1497 where calling loginRedirect on page load will cause the application to go into a redirect loop.

This PR adds an API which allows applications using the redirect flow to utilize and notify their application that MSAL is done loading.

@coveralls
Copy link

coveralls commented Apr 24, 2020

Coverage Status

Coverage decreased (-0.01%) to 79.833% when pulling 12ffdf2 on onPageLoadFix-msal-v2 into dd5d2e0 on dev.

@jasonnutter jasonnutter linked an issue Apr 24, 2020 that may be closed by this pull request
5 tasks
Copy link
Contributor

@jasonnutter jasonnutter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for addressing feedback!

Copy link
Collaborator

@tnorling tnorling left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@pkanher617 pkanher617 merged commit 4e0a4c6 into dev Apr 27, 2020
@@ -106,6 +107,7 @@ export class PublicClientApplication {
* containing data from the server (returned with a null or non-blocking error).
*/
async handleRedirectCallback(authCallback: AuthCallback): Promise<void> {
console.warn("handleRedirectCallback will be deprecated upon release of msal-browser@v2.0.0. Please transition to using onRedirectAppLoad().");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pkanher617 Forgot to update the warning with the new API name :(

@pkanher617 pkanher617 deleted the onPageLoadFix-msal-v2 branch June 8, 2020 16:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

How do I automatically sign in on page load using @azure/msal-browser@2.0.0?
4 participants