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 login page is responsible for establishing the user’s authentication session. This requires a user to present credentials and typically involves these steps:
When IdentityServer needs to show the login page, it redirects the user to a configurable LoginUrl.
builder.Services.AddIdentityServer(opt => {
opt.UserInteraction.LoginUrl = "/path/to/login";
})
If no LoginUrl is set, IdentityServer will infer it from the LoginPath of your Cookie Authentication Handler. For example:
builder.Services.AddAuthentication()
.AddCookie("cookie-handler-with-custom-path", options =>
{
options.LoginPath = "/path/to/login/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.LoginPath = "/path/to/login/for/aspnet_identity";
});