20 lines
636 B
Text
20 lines
636 B
Text
|
@page "/sys/logout"
|
||
|
@using ImageBoardServerApp.Auth
|
||
|
@inject NavigationManager navManager
|
||
|
@inject AuthenticationStateProvider authStateProvider
|
||
|
<h3>Logging out...</h3>
|
||
|
|
||
|
@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);
|
||
|
}
|
||
|
}
|