Files
Shogi/Shogi.UI/Pages/Identity/LogoutPage.razor
Lucas Morgan 51d234d871 Replace custom socket implementation with SignalR.
Replace MSAL and custom cookie auth with Microsoft.Identity.EntityFramework
Also some UI redesign to accommodate different login experience.
2024-08-25 03:46:44 +00:00

30 lines
623 B
Plaintext

@page "/logout"
@inject IAccountManagement Acct
<main class="PrimaryTheme">
<h1>Logout</h1>
<AuthorizeView @ref="authView">
<Authorized>
<div class="alert alert-info">Logging you out...</div>
</Authorized>
<NotAuthorized>
<p>Thanks for playing!</p>
<div class="alert alert-success">You're logged out. <a href="/login">Log in.</a></div>
</NotAuthorized>
</AuthorizeView>
</main>
@code {
private AuthorizeView? authView;
protected override async Task OnInitializedAsync()
{
if (await Acct.CheckAuthenticatedAsync())
{
await Acct.LogoutAsync();
}
await base.OnInitializedAsync();
}
}