Test the Secure Blazor WebAssembly Application
Explore how to run and test a Blazor WebAssembly application secured with Auth0. Understand the login process using Auth0 Universal Login, authorization flow, and how access restrictions are enforced. Practice interacting with the secured app including login, logout, and user consent screens.
We'll cover the following...
Let’s run the Blazor WebAssembly application to see how authentication and access control work.
Launch the application
To launch our application, let’s move to the root folder of our solution and run the following command in a terminal window:
dotnet run --project Server
We’ll see the home page of our application, but this time we see the “Log in” link on the top bar.
If we click the “Counter” item on the left menu, we get a message saying we are not authorized to access that page, as shown in the following image:
The same happens when we try to access the “Fetch data” page, as the image below shows:
This means the protection we implemented works!
Log in with Auth0
Here, we’ll access our application by clicking the “Log in” link near ...