...

/

Test the Secure Blazor WebAssembly Application

Test the Secure Blazor WebAssembly Application

Learn to test authentication and authorization on our secure Blazor WebAssembly application.

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 ...