Skip to content

Blazor Identity template's RevalidatingAuthenticationStateProvider should implement IHostEnvironmentAuthenticationStateProvider #12692

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

Closed
SteveSandersonMS opened this issue Jul 29, 2019 · 1 comment
Assignees
Labels
area-blazor Includes: Blazor, Razor Components bug This issue describes a behavior which is not expected - a bug. Done This issue has been fixed

Comments

@SteveSandersonMS
Copy link
Member

To address issues with Windows authentication, we fixed #12051 via PR #12421. This provides a mechanism by which the host environment can notify the active authentication state provider that the current user principal has changed.

While this was primarily for Windows authentication, other authentication mechanisms can make use of it too. It would make sense for the "local authentication" (identity) template to also hook into this mechanism, but currently it doesn't.

To fix this, we should make RevalidatingAuthenticationStateProvider<TUser> in the project template implement IHostEnvironmentAuthenticationStateProvider. This requires a few changes to the revalidation logic to make it understand that the current user principal can change.

@SteveSandersonMS SteveSandersonMS added the area-blazor Includes: Blazor, Razor Components label Jul 29, 2019
@SteveSandersonMS SteveSandersonMS self-assigned this Jul 29, 2019
@mkArtakMSFT mkArtakMSFT added the bug This issue describes a behavior which is not expected - a bug. label Jul 29, 2019
@mkArtakMSFT mkArtakMSFT added this to the 3.0.0-preview9 milestone Jul 29, 2019
@SteveSandersonMS
Copy link
Member Author

To be super clear, once we've made this change, we will not be using SignInManager inside the custom authentication state provider. That's broken on Azure SignalR service anyway.

@mkArtakMSFT mkArtakMSFT added Done This issue has been fixed and removed Working labels Aug 7, 2019
@ghost ghost locked as resolved and limited conversation to collaborators Dec 2, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-blazor Includes: Blazor, Razor Components bug This issue describes a behavior which is not expected - a bug. Done This issue has been fixed
Projects
None yet
Development

No branches or pull requests

2 participants