diff --git a/LiteCharms.Features/Extensions/Api.cs b/LiteCharms.Features/Extensions/Api.cs index 84c087d..f1b2bda 100644 --- a/LiteCharms.Features/Extensions/Api.cs +++ b/LiteCharms.Features/Extensions/Api.cs @@ -104,13 +104,12 @@ public static class Api app.MapGet("/logout", async (HttpContext context) => { - var schemesToSignOut = new[] { CookieAuthenticationDefaults.AuthenticationScheme, OpenIdConnectDefaults.AuthenticationScheme, }; + await context.SignOutAsync(CookieAuthenticationDefaults.AuthenticationScheme); - string postLogoutRedirectDestination = "/"; - - await context.SignOutAsync(scheme: null, properties: new AuthenticationProperties { RedirectUri = postLogoutRedirectDestination, }); - - foreach (var scheme in schemesToSignOut) await context.SignOutAsync(scheme); + await context.SignOutAsync(OpenIdConnectDefaults.AuthenticationScheme, new AuthenticationProperties + { + RedirectUri = "/", + }); }); return app;