You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was have some issues getting blazor to work in a solution with multiple auth middleware like AzureAD and AzureADBearer and the problem was that i needed to add an Authorize with AuthenticationSchemes set.
This however can only be done globally since that property can't be specified on the Component level. Instead as, per the discussion below, i can call endpoints.MapBlazorHub().RequireAuthorization(new AuthorizeAttribute { AuthenticationSchemes = AzureADDefaults.AuthenticationScheme }); but that is not documented on this page.
I think it would be good to add because blazor is probably going to be used for a lot of back office apps where people want to ensure there is no unauthenticated access
Uh oh!
There was an error while loading. Please reload this page.
I was have some issues getting blazor to work in a solution with multiple auth middleware like AzureAD and AzureADBearer and the problem was that i needed to add an Authorize with AuthenticationSchemes set.
This however can only be done globally since that property can't be specified on the Component level. Instead as, per the discussion below, i can call
endpoints.MapBlazorHub().RequireAuthorization(new AuthorizeAttribute { AuthenticationSchemes = AzureADDefaults.AuthenticationScheme });
but that is not documented on this page.I think it would be good to add because blazor is probably going to be used for a lot of back office apps where people want to ensure there is no unauthenticated access
The issue where this discussion was has is dotnet/aspnetcore#14916
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
The text was updated successfully, but these errors were encountered: