Asp.Net Core Mvc项目登录IdentityServer4验证无法跳转问题

Asp.Net Core Mvc项目连接IdentityServer4项目,输入账号密码验证后,无法跳转到MVC项目。

 停留在 http://localhost:5001/Account/Login?ReturnUrl 这个界面,不跳转

解决方法:IdentityServer4项目中Startup类中

 public void ConfigureServices(IServiceCollection services)

这个方法中添加如下代码:

  services.AddAuthentication(options =>
            {
                options.DefaultAuthenticateScheme = CookieAuthenticationDefaults.AuthenticationScheme;
                options.DefaultChallengeScheme = CookieAuthenticationDefaults.AuthenticationScheme;
            }).AddCookie("Cookies");
原文地址:https://www.cnblogs.com/lhwpc/p/15066951.html