IdentityServer进入无限的身份验证循环

ora*_*rad 4 thinktecture-ident-server openid-connect identityserver3

我在IdentityServer中设置了以下客户端:

new Client
{
    ClientName = "My web application",
    Enabled = true,
    ClientId = "mywebapp",
    ClientSecrets = new List<ClientSecret>
    {
        new ClientSecret("somesecret")
    },

    Flow = Flows.Hybrid,

    ClientUri = "https://app.mydomain.com",

    RedirectUris = new List<string>
    {
        "oob://localhost/wpfclient",
        "http://localhost:2672/",
        "https://app.mydomain.com"
    }
}
Run Code Online (Sandbox Code Playgroud)

我们说它是在线托管的https://auth.mydomain.com/core.

尝试修改MVC OWIN客户端(混合)示例客户端以登录到上述身份服务器,在Startup.cs我修改了ClientId,ClientSecretRedirectUri匹配IdSrv中的客户端设置.现在,当我尝试导航到需要授权的页面时,我被重定向到IdentityServer的URL.当我登录时,断点AuthorizationCodeReceived在客户端的通知中命中,Startup.cs然后进入循环.浏览器的状态显示:

Waiting for localhost...
Waitnig for auth.mydomain.com...
Waiting for localhost...
Waitnig for auth.mydomain.com...
...
Run Code Online (Sandbox Code Playgroud)

等等,永远不会完成登录.为什么会这样?请帮忙.

谢谢!

raw*_*wel 7

最有可能的原因是重定向中混合了http和https.请始终使用一个方案,并在浏览器地址栏上检查方案.