IdentityServer4 RequireConsent true hangs

1.2k views Asked by At

I setup IdentityServer4 following IdentityServerWithAspNetIdentity tutorial. If i set RequireConsent = true on client settings, redirect to url hangs. Any suggestions?

    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
            }
        };

} Thanks and regards

1

There are 1 answers

0
ozgurozkanakdemirci On BEST ANSWER

The solution was only adding a consent page when RequireConsent = true Thanks @leastprivilege