我将Identity Server 4与Asp.net 4.5 MVC 4 Web应用程序集成在一起。在授权操作重定向到Identity Server登录页面后,但在成功登录后,它不会再次返回到客户端MVC应用程序。Asp.net MVC 4.5.2在用IdentityServer4登录后不重定向
我的身份服务器4的客户是
new Client { ClientId = "demo",
AllowedScopes = new List<string> { "openid"},
AllowedGrantTypes = GrantTypes.Hybrid,
RedirectUris = new List<string>{"http://localhost:51048/signin-oidc"},}
我的启动包含
app.UseCookieAuthentication(new CookieAuthenticationOptions
{
AuthenticationType = "Cookies"
});
app.UseOpenIdConnectAuthentication(new OpenIdConnectAuthenticationOptions
{
Authority = "http://localhost:5000", //ID Server
ClientId = "demo",
ResponseType = "id_token code",
SignInAsAuthenticationType = "Cookies",
RedirectUri = "http://localhost:51048/signin-oidc",
Scope = "openid",
});
什么日志说?您为客户端和UseOpenIdConnectAuthentication的RedirectUri配置的RedirectUri也不相同。 – Lutando
重定向uri的端口不匹配 – devqon
现在的问题是MVC4还是ASP.NET Core MVC相关?标签似乎很混乱,从第一个观点来看,它与asp.net核心 – Tseng