新文章 网摘 文章 随笔 日记

IdentityServer3中出现Invalid redirect_uri的问题:

解决办法:

在服务端的Clients中加入

RedirectUris = new List<string>()
{
  "http://localhost:49795/"
}

 

例如:

new Client
{
  Enabled = true,
  ClientName = "SSO",
  ClientId = "mvc",
  Flow = Flows.Implicit,
  RequireConsent=false,
  ClientSecrets=new List<Secret> {new Secret("21B5F798-BE55-42BC-8AA8-0025B903DC3B".Sha256())},

  AllowedScopes = new List<string> {
  Constants.StandardScopes.OpenId,
  Constants.StandardScopes.Profile},

  RedirectUris = new List<string>()
  {
    "http://localhost:49795/"
  },
  AllowedCorsOrigins = new List<string>
  {
    "http://localhost:49795/"
  }
}

 

posted @ 2020-06-12 11:01  岭南春  阅读(1414)  评论(1编辑  收藏  举报