mirror of
https://github.com/PacktPublishing/Web-Development-with-Blazor-Second-Edition.git
synced 2026-04-08 07:43:53 +00:00
19 lines
423 B
Text
19 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");
|
||
|
|
}
|
||
|
|
}
|