-
Notifications
You must be signed in to change notification settings - Fork 10.4k
Closed
Labels
area-blazorIncludes: Blazor, Razor ComponentsIncludes: Blazor, Razor Componentsfeature-blazor-wasmThis issue is related to and / or impacts Blazor WebAssemblyThis issue is related to and / or impacts Blazor WebAssemblyfeature-blazor-wasm-auth
Description
Is there an existing issue for this?
- I have searched the existing issues and yes there is, I've linked it below.
Describe the bug
This issue - #31088 (comment) is happening for me as well. The logout works fine when I'm on the root page, however, if I'm on any other page it won't work and I get the same error as this original post.
Using .NET 7.0 and OIDC.
I'm using the NavigateToLogout method like below.
Within the LoginDisplay.
<AuthorizeView>
<Authorized>
<span class="currentuser-details-section dark:text-dark-mode-text cursor-pointer" @onclick="SwitchTheme">User: @context.User.Identity?.Name</span>
<button class="nav-link btn btn-link" @onclick="BeginSignOut">(Log out)</button>
</Authorized>
</AuthorizeView>
Code Behind
private void BeginSignOut(MouseEventArgs args)
{
this.NavigationManager.NavigateToLogout("authentication/logout");
}
Expected Behavior
Should logout from any page.
Steps To Reproduce
No response
Exceptions (if any)
No response
.NET Version
7.0
Anything else?
No response
Metadata
Metadata
Assignees
Labels
area-blazorIncludes: Blazor, Razor ComponentsIncludes: Blazor, Razor Componentsfeature-blazor-wasmThis issue is related to and / or impacts Blazor WebAssemblyThis issue is related to and / or impacts Blazor WebAssemblyfeature-blazor-wasm-auth