Documentation / tutorial on securing a Blazor Server App with Auth0

Sorry, I use the exact same method on WASM logout and .net 7.0 in two places. It still log out twice sometimes
Can you suggest what is wrong with my code?
Thanks.

private void BeginSignOut(MouseEventArgs args)
{
Task.Run(async () => JSRuntime.InvokeVoidAsync(“sessionStorage.clear()”));
Navigation.NavigateToLogout(“authentication/logout”);
}

@{ var authority = (string)Configuration["Auth0:Authority"]; var clientId = (string)Configuration["Auth0:ClientId"]; Task.Run(async () => JSRuntime.InvokeVoidAsync("sessionStorage.clear()")); Navigation.NavigateToLogout($"{authority}/v2/logout?client_id={clientId}"); }