This commit is contained in:
@@ -104,13 +104,12 @@ public static class Api
|
|||||||
|
|
||||||
app.MapGet("/logout", async (HttpContext context) =>
|
app.MapGet("/logout", async (HttpContext context) =>
|
||||||
{
|
{
|
||||||
var schemesToSignOut = new[] { CookieAuthenticationDefaults.AuthenticationScheme, OpenIdConnectDefaults.AuthenticationScheme, };
|
await context.SignOutAsync(CookieAuthenticationDefaults.AuthenticationScheme);
|
||||||
|
|
||||||
string postLogoutRedirectDestination = "/";
|
await context.SignOutAsync(OpenIdConnectDefaults.AuthenticationScheme, new AuthenticationProperties
|
||||||
|
{
|
||||||
await context.SignOutAsync(scheme: null, properties: new AuthenticationProperties { RedirectUri = postLogoutRedirectDestination, });
|
RedirectUri = "/",
|
||||||
|
});
|
||||||
foreach (var scheme in schemesToSignOut) await context.SignOutAsync(scheme);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
return app;
|
return app;
|
||||||
|
|||||||
Reference in New Issue
Block a user