Passing token hint during signout #92

Merged
khwezi merged 1 commits from payments into master 2026-06-07 14:09:32 +02:00
Showing only changes of commit 02ff14ccc8 - Show all commits
+8 -5
View File
@@ -104,12 +104,15 @@ public static class Api
app.MapGet("/logout", async (HttpContext context) =>
{
await context.SignOutAsync(CookieAuthenticationDefaults.AuthenticationScheme);
var idToken = await context.GetTokenAsync("id_token");
await context.SignOutAsync(OpenIdConnectDefaults.AuthenticationScheme, new AuthenticationProperties
{
RedirectUri = "/",
});
var authProperties = new AuthenticationProperties { RedirectUri = "/", };
if (!string.IsNullOrEmpty(idToken))
authProperties.Parameters.Add("id_token_hint", idToken);
await context.SignOutAsync(OpenIdConnectDefaults.AuthenticationScheme, authProperties);
await context.SignOutAsync(CookieAuthenticationDefaults.AuthenticationScheme);
});
return app;