登录后IdentityServer4重定向不起作用

时间:2018-07-24 09:30:49

标签: asp.net-core identityserver4

Version
Identiotyserver4 2.2.0
ASP.NETCore 2.0.5

1. Client-Authcode


    2.new Client {
    3. ClientId = "authorizationCodeClient2",
    4. ClientName = "Authorization Code Client",
     5.ClientSecrets = new List { new Secret { Value = "mysecret".Sha512() } },
      Enabled = true,
     6.AllowedGrantTypes = new List { "authorization_code" }, //DELTA         //IdentityServer3 wanted Flow = Flows.AuthorizationCode,
   7. RequireConsent = true,
   8. AllowRememberConsent = false,
   9. RedirectUris =
    new List {
    "http://localhost:5436/account/oAuth2/",
    },
  10.  PostLogoutRedirectUris =
    new List {"http://localhost:5436/",},
    AllowedScopes = new List {
    "api1"
    },
    AccessTokenType = AccessTokenType.Jwt
    }
2. Client -Implicit
    new Client
                    {
                        ClientId = "js",
                        ClientName = "JavaScript Client",
                        AllowedGrantTypes = GrantTypes.Implicit,
                        AllowAccessTokensViaBrowser = true,
                         ClientUri = "https://localhost:5003",
                        Properties = new Dictionary<string, string>
                        {
                            { "StartLoginFragment", "/callback.html" }
                        },
                        RedirectUris =           { "http://localhost:5003/callback.html" },
                        PostLogoutRedirectUris = { "http://localhost:5003/index.html" },
                            AllowedCorsOrigins =     { "http://localhost:5003" },

                            AllowedScopes =
                            {
                                IdentityServerConstants.StandardScopes.OpenId,
                                IdentityServerConstants.StandardScopes.Profile,
                            "api1"
                        }
                    }
   We are able to login with credentials but after redirection is not happening. It's returning to server login page

enter image description here

0 个答案:

没有答案