Securing Blazor WebAssembly Views

Get familiar with enforcing authorization requirements on individual Blazor views.

In this lesson, we will learn how to enforce authentication on specific views in Blazor WebAssembly. The following playground will help us with this goal:

{
  "Logging": {
    "LogLevel": {
      "Default": "Information",
      "Microsoft.AspNetCore": "Warning"
    }
  },
  "AllowedHosts": "*"
}
Blazor WebAssembly app with the OpenID Connect flow

Note: Because we have to build two ASP.NET Core applications and populate the IdP database with the initial seed data, the build process is expected to take at least a few minutes.

If we launch this application, we will not be taken to the home page immediately. Instead, we will be redirected to the login page of ...