I started from a visual studio template, a new Blazor WebAssembly with authentication and web API as the server-side.
My problem there is to protect all the pages and not just some pages. I tried to add :
@using Microsoft.AspNetCore.Authorization
@attribute [Authorize]
to the MainLayout instead of all pages but without any luck. I wanted to do that because I'm writing an admin and I don't want people to see the layout at all if there are not connected