[Blazor] Support state in NavigationManager#42534
Merged
Merged
Conversation
campersau
reviewed
Jul 4, 2022
0ee7fd6 to
6aa5aab
Compare
MackinnonBuck
approved these changes
Jul 7, 2022
SteveSandersonMS
approved these changes
Jul 8, 2022
Member
SteveSandersonMS
left a comment
There was a problem hiding this comment.
Nice!
I know it would be annoying to go through CI all over again just to change one XML doc, so I totally understand if you prefer not to block this PR on it. If you wouldn't mind making that small tweak in your follow-up PR for auth, that would be great.
Member
Author
It's ok, I had to update the JS files which I forgot after the rename, so I have updated the remarks to bring it inline with what the remarks on other properties mention. |
8 tasks
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes #42617
Adds support for passing
stateduring navigations via navigation manager and updates the authentication infrastructure to make use of it.The previous authentication infrastructure implementation used JS interop and sessionStorage and the URL query string to pass data between authentication states.
This was brittle and required extra work to avoid things like CSRF logouts or to encode/decode error messages on the error UI states.
The new NavigationManager API simplifies associating a state that is associated with the navigation entry and not with the session (like sessionStorage) and allows simple communication between different pages with the benefit that there is no cleanup needed.
Part of the improvements on the auth system are going to rely on this to pass data from other pages to the authentication pages, but since this change is general purpose and a net positive, I separated it into its own PR.