我將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