This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user