From 0ec7ef4861304982cb80e8e5d4b89383bc7c2995 Mon Sep 17 00:00:00 2001 From: Khwezi Mngoma Date: Sat, 13 Jun 2026 23:06:53 +0200 Subject: [PATCH] Fixed cookie and header collision issue on signout --- LiteCharms.Features/Extensions/Api.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/LiteCharms.Features/Extensions/Api.cs b/LiteCharms.Features/Extensions/Api.cs index d89b998..a4020d1 100644 --- a/LiteCharms.Features/Extensions/Api.cs +++ b/LiteCharms.Features/Extensions/Api.cs @@ -77,6 +77,8 @@ public static class Api options.SaveTokens = true; options.GetClaimsFromUserInfoEndpoint = true; + options.ForwardSignOut = CookieAuthenticationDefaults.AuthenticationScheme; + options.Scope.Clear(); options.Scope.Add("openid"); options.Scope.Add("profile"); @@ -159,7 +161,6 @@ public static class Api authProperties.Parameters.Add("id_token_hint", idToken); await context.SignOutAsync(OpenIdConnectDefaults.AuthenticationScheme, authProperties); - await context.SignOutAsync(CookieAuthenticationDefaults.AuthenticationScheme); }); return app;