IdentityServer4 RequireConsent true挂起

时间:2016-12-22 18:42:19

标签: identityserver4

我在IdentityServerWithAspNetIdentity教程之后设置了IdentityServer4。 如果我在客户端设置上设置RequireConsent = true,则重定向到url挂起。 有什么建议吗?

    public static IEnumerable<Client> GetClients()
    { return new List<Client> {
            new Client
            {
                ClientId = "MyUx",
                ClientName = "MyUx MVC Client",
                AllowedGrantTypes = GrantTypes.HybridAndClientCredentials,
                RequireConsent = false,
                ClientSecrets= {new Secret("abcdef".Sha256()) },

                RedirectUris = { "http://localhost:5002/signin-oidc" },

                PostLogoutRedirectUris = {"http://localhost:5002"},

                AllowedScopes = {
                    IdentityServerConstants.StandardScopes.OpenId,
                    IdentityServerConstants.StandardScopes.Profile,

                    "custom.profile"                     
                },
                AllowOfflineAccess = true
            }
        };

} 谢谢和问候

1 个答案:

答案 0 :(得分:0)

解决方案仅在RequireConsent = true时添加同意页面 谢谢@leastprivilege