@page "/sys/logout"
@using ImageBoardServerApp.Auth
@inject NavigationManager navManager
@inject AuthenticationStateProvider authStateProvider
Logging out...
@code {
protected override async Task OnParametersSetAsync()
{
await base.OnParametersSetAsync();
}
protected override async Task OnAfterRenderAsync(bool firstRender)
{
await base.OnAfterRenderAsync(firstRender);
var customAuthStateProvider = (CustomAuthenticationStateProvider) authStateProvider;
await customAuthStateProvider.UpdateAuthenticationStateAsync(null);
navManager.NavigateTo("/", true);
}
}