Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 5140da2c6c | |||
| 02ff14ccc8 |
@@ -104,12 +104,15 @@ public static class Api
|
|||||||
|
|
||||||
app.MapGet("/logout", async (HttpContext context) =>
|
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
|
var authProperties = new AuthenticationProperties { RedirectUri = "/", };
|
||||||
{
|
|
||||||
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;
|
return app;
|
||||||
|
|||||||
Reference in New Issue
Block a user