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
Provide a way for developers to override the navigation methods used #2985
Merged
Conversation
This file contains 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
10 tasks
github-actions
bot
added
msal-browser
Related to msal-browser package
msal-common
Related to msal-common package
msal-react
Related to @azure/msal-react
samples
Related to the samples apps for the library.
labels
Feb 6, 2021
tnorling
modified the milestones:
@azure/msal-angular@2.0.0-beta.0,
@azure/msal-react@1.0.0-beta.0
Feb 6, 2021
tnorling
modified the milestones:
@azure/msal-react@1.0.0-alpha.5,
@azure/msal-react@1.0.0-beta.0
Feb 9, 2021
…tion-library-for-js into client-side-navigation
tnorling
requested review from
jasonnutter,
jo-arroyo,
pkanher617 and
sameerag
as code owners
February 10, 2021 17:32
jasonnutter
reviewed
Feb 10, 2021
jasonnutter
reviewed
Feb 10, 2021
pkanher617
reviewed
Feb 18, 2021
tnorling
commented
Feb 18, 2021
change/@azure-msal-browser-58ddbcda-5d34-4249-acbd-c5e52b1d8144.json
Outdated
Show resolved
Hide resolved
tnorling
changed the title
Add the ability to use client-side navigation when redirecting back to start page
Provide a way for developers to override the navigation methods used
Feb 18, 2021
…icrosoft-authentication-library-for-js into client-side-navigation
jo-arroyo
approved these changes
Feb 19, 2021
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.
LGTM. Just a few nits for consistency.
samples/msal-react-samples/gatsby-sample/src/wrap-with-provider.js
Outdated
Show resolved
Hide resolved
Co-authored-by: Jo Arroyo <joarroyo@microsoft.com>
…tion-library-for-js into client-side-navigation
tnorling
modified the milestones:
@azure/msal-react@1.0.0-beta.0,
@azure/msal-browser@2.12.0
Feb 22, 2021
…tion-library-for-js into client-side-navigation
pkanher617
reviewed
Feb 25, 2021
pkanher617
reviewed
Feb 25, 2021
pkanher617
reviewed
Feb 25, 2021
pkanher617
approved these changes
Feb 26, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
documentation
Related to documentation.
msal-browser
Related to msal-browser package
msal-react
Related to @azure/msal-react
samples
Related to the samples apps for the library.
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.
Context/Motivation: React routers, such as
react-router-dom
ornext/router
provide the ability to do "client side routing" using the HTML5 History API which essentially means that you can navigate to other "pages" in your app without doing a hard redirect and reloading the entire webpage. In Angular you can use the built-in router to do this by callingRouter.navigateByUrl()
Behavior Now: When using the redirect flow msal will attempt to send you back to the page you started on by reassigning
window.location
. This causes the whole SPA to reload and you gain no performance benefit from using a router.Proposed Change: This PR removes the
navigateWindow
API and replaces it with aNavigationClient
interface which the developer can override by providing their own implementations ofnavigateInternal
and/ornavigateExternal
. Also adds asetNavigationClient
API developers can use to set theNavigationClient
after initializingPublicClientApplication
(needed for react and angular)Addresses #2869
Follow up enhancements: