Version 6.x has been out of support since May 14, 2024, and this corresponding section of the documentation is no longer maintained. We strongly recommend you upgrade to the latest supported version of 7.x and read the latest version of this documentation.
The logout page is responsible for terminating the user’s authentication session. This is a potentially complicated process and involves these steps:
When IdentityServer needs to show the logout page, it redirects the user to a configurable LogoutUrl.
builder.Services.AddIdentityServer(opt => {
opt.UserInteraction.LogoutUrl = "/path/to/logout";
})
If no LogoutUrl is set, IdentityServer will infer it from the LogoutPath of your Cookie Authentication Handler. For example:
builder.Services.AddAuthentication()
.AddCookie("cookie-handler-with-custom-path", options =>
{
options.LogoutPath = "/path/to/logout/from/cookie/handler";
})
If you are using ASP.NET Identity, configure its cookie authentication handler like this:
builder.Services
.AddIdentityServer()
.AddAspNetIdentity<ApplicationUser>();
builder.Services
.ConfigureApplicationCookie(options =>
{
options.LogoutPath = "/path/to/logout/for/aspnet_identity";
});