Authenticatiwng and Authorizing Users in Blazor
All the features we have built and learned about so far are for any user who loads the app in the browser. Well, in real-world applications, that’s not always the case. In most of the scenarios you will face, some features require the app to know who is using it, and in other cases, the full app cannot be used until it knows who is using it.
In this chapter, we are going to learn about authentication and how it happens on the client side, what authentication means, and how we can implement it in Blazor WebAssembly.
We will explore the Blazor authentication library in depth, alongside most of its capabilities that enable you to build enterprise-level single-page applications. To understand everything in detail, we will build a custom authentication flow. After building the core, we will take advantage of the authentication library to restrict access to some pages to only logged-in users, show or hide partial content in the...