I am using a Blazor WebAssembly 3.2-preview3 application scaffolded with Identity that has created the following 3 projects:
App.Client
App.Server
App.Shared
My IdentityUser implementation is called AppUser, and my ApiAuthorizationDbContext implementation is called AppDb
I have a role called Admin that has been assigned to administrators, and a Policy called RequireAdmin that checks for the Admin role. However, when I try to use an AuthorizeView in App.Client and view the page with an administrator, it does not show the link.
<AuthorizeView Policy="RequireAdmin">
<Authorized>
<a class="nav-link" href="admin">Admin</a>
</Authorized>
</AuthorizeView>
How can I enable roles and policies in my Blazor WebAssembly application?