@using ImageBoardServerApp.Auth @inherits LayoutComponentBase @inject AuthenticationStateProvider authStateProvider @inject NavigationManager navManager BulletBoard
@Body
@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 = $"Welcome User # {user.User.Identity.Name}"; } } }