mirror of
https://github.com/PacktPublishing/Web-Development-with-Blazor-Second-Edition.git
synced 2026-04-07 23:33:53 +00:00
18 lines
423 B
Text
18 lines
423 B
Text
@implements ILoginStatus
|
|
@inject NavigationManager Navigation
|
|
|
|
<AuthorizeView>
|
|
<Authorized>
|
|
<a href="#" @onclick="BeginSignOut">Log out</a>
|
|
</Authorized>
|
|
<NotAuthorized>
|
|
<a href="authentication/login">Log in</a>
|
|
</NotAuthorized>
|
|
</AuthorizeView>
|
|
|
|
@code {
|
|
private async Task BeginSignOut(MouseEventArgs args)
|
|
{
|
|
Navigation.NavigateToLogout("authentication/logout");
|
|
}
|
|
}
|