File size: 561 Bytes
0acba57
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
@page "/logout"
@using BlazorFrontend.Providers
@using Microsoft.AspNetCore.Components.Authorization
@inject AuthenticationStateProvider AuthStateProvider
@inject NavigationManager Navigation

<PageTitle>Logging out...</PageTitle>

<div class="text-center mt-10">
    <p class="text-slate-600">Signing you out...</p>
</div>

@code {
    protected override async Task OnInitializedAsync()
    {
        var jwtProvider = (JwtAuthenticationStateProvider)AuthStateProvider;
        await jwtProvider.LogoutAsync();
        Navigation.NavigateTo("/login");
    }
}