Files
decePubClient/Shared/LoginDisplay.razor
T
thepraandClaude Opus 5.5 96d1db1008 Fix logout, the client log store and empty name attributes
Logout:
- It navigated to "authenticatio/logout", a misspelled route.
- The correct template route, authentication/logout, would throw anyway. Its
  RemoteAuthenticatorView casts the AuthenticationStateProvider to the OIDC
  template's service, and the app registers TokenAuthStateProvider instead.
- It now signs out through TokenAuthStateProvider.LogoutAsync, as the code
  commented out in the page intended, and returns home. LoginDisplay's sign-out
  goes through it as well.
- This also drops the obsolete SignOutSessionStateManager, the build's last
  warning.

The IndexedDB schema never declared the ClientLogs store that IStorage.AddLog
writes to, so every client log write failed inside its try/catch. Version 2 adds
the store, keyed by the Id AddLog assigns.

DInputBase.NameAttribute renders no name instead of name="" when the form maps
no field names.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LsXgEaXee4GCU1hwYgPJXw
2026-10-03 12:43:07 +02:00

23 lines
523 B
Plaintext

@inherits LocalizableComponentBase
@inject NavigationManager Navigation
<AuthorizeView>
<Authorized>
<DButton OnClick="BeginSignOut">
@Localizer["Logout"]
</DButton>
</Authorized>
<NotAuthorized>
<NavLink ActiveClass="btn-active" class="btn" href="authentication/login">
@Localizer["Login"]
</NavLink>
</NotAuthorized>
</AuthorizeView>
@code {
[CascadingParameter] CascadingState CascadingState { get; set; }
private void BeginSignOut(MouseEventArgs args)
{
Navigation.NavigateTo("logout");
}
}