@page "/modmenu"
@using ImageBoardServerApp.Auth
@inject AuthenticationStateProvider authStateProvider
@inject NavigationManager navManager
ModMenu
Welcome @mail to the mod menu
You do not have permission to view this menu.
@code {
private string mail { get; set; } = "";
protected override async Task OnInitializedAsync()
{
var cauthStateProvder = (CustomAuthenticationStateProvider)authStateProvider;
var user = await cauthStateProvder.GetAuthenticationStateAsync();
if (user.User.Identity.IsAuthenticated)
{
mail = user.User.Identity.Name;
}
}
}