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

Root-level cascading values + CascadingAuthenticationState at root #49204

Merged
merged 16 commits into from
Jul 5, 2023

Conversation

SteveSandersonMS
Copy link
Member

Implements #49104
Fixes #48927

See #49104 for the design. This PR includes a root-level equivalent to <CascadingAuthenticationState> and E2E tests showing it works in full-stack Blazor with an interactive @page component.

@SteveSandersonMS SteveSandersonMS requested a review from a team as a code owner July 4, 2023 17:41
@ghost ghost added the area-blazor Includes: Blazor, Razor Components label Jul 4, 2023
@javiercn
Copy link
Member

javiercn commented Jul 5, 2023

Looks pretty straightforward.

Since this is meant to handle the CascadingAuthenticationState, do you think we should flow the Principal automatically from static->interactive?

With this fix, you get the cascading authentication state on the server, but you won't get nothing in webassembly, will you?

@javiercn javiercn self-requested a review July 5, 2023 14:37
@SteveSandersonMS
Copy link
Member Author

With this fix, you get the cascading authentication state on the server, but you won't get nothing in webassembly, will you?

TBH I'm not certain it's desirable to make the WebAssembly app think it has a particular authentication state that it didn't obtain itself. For example it could be misleading since the server may consider the WebAssembly app to have a different authentication state (different claims, at the very least) than existed during SSR.

But either way, I think that should be considered out of scope for this PR. This PR is about providing a way that authentication state can be cascaded (once you have established some authentication state), rather than trying to solve other end-to-end problems about how the authentication state is determined in the first place.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-blazor Includes: Blazor, Razor Components
Projects
None yet
2 participants