Using ConfigureApplicationCookie to change the LoginPath only works with AddIdentity but not with AddDefaultIdentity, even after adding the configuration after AddDefaultIdentity as per #1414 .
services.AddDefaultIdentity<IdentityUser>(); //Redirects to Account/Login
//services.AddIdentity<IdentityUser, IdentityRole>(); //Redirects to Account/LoginRegister
services.Configure<IdentityOptions>(options =>
{
// Password settings.
options.Password.RequireDigit = false;
options.Password.RequireLowercase = false;
.....
// User settings.
options.User.AllowedUserNameCharacters =
"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-._@+";
options.User.RequireUniqueEmail = false;
});
services.ConfigureApplicationCookie(options =>
{
options.LoginPath = $"/Identity/Account/LoginRegister";
});
Using ConfigureApplicationCookie to change the LoginPath only works with AddIdentity but not with AddDefaultIdentity, even after adding the configuration after AddDefaultIdentity as per #1414 .