Secure the Blazor Server Application
Learn to protect a Blazor Server application from unauthorized access.
We'll cover the following...
The main purpose of authentication is to prevent access by unauthorized users. In other words, it is about implementing access control. Let’s see how to implement access control in our Blazor Server application.
Use the authorization components
The Blazor framework provides some authorization components that allow us to easily differentiate our UI based on authorized and unauthorized users.
First, we’ll enable access control at the top-level UI component, the App
component. Move to the root folder of our Blazor Server project and open the App.razor
file. We’ll ...