Quantcast
Channel: Active questions tagged blazor - Stack Overflow
Viewing all articles
Browse latest Browse all 4839

Why does Blazor Web App Authentication type Identity, not include the UseAuthorization or UseAuthentication middleware

$
0
0

I have created a Blazor Web App (.NET 8) and selected the Auth type to be "Individiual Authentication". This has scaffolded all of the user management pages for me and provided me the EF models for me to migrate into a database.

However, in the Program.cs file I have noticed a lack of two middleware calls:

  1. UseAuthorization();
  2. UseAuthentication();

Now, I know from ASP.NET you need to include these, and it seems in a lot of the .NET documentation even Blazor tutorials by Microsoft they are included. However, the application with Auth clearly functions without.

My assumption is this is because Blazor Web App uses SignalR instead of HTTP and the token is accessed through the dedicated AuthenticationStateProvider instead of being included in each HTTP request (Which I know doesn't happen in Blazor).

I am just looking for clarification.


Viewing all articles
Browse latest Browse all 4839

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>