小编Pas*_*man的帖子

身份服务器 4 登录后重定向仅在 Chrome 中不起作用

我使用身份服务器 4,称之为“身份验证服务器”,在 .net core 3.1 上运行。重定向到 auth-server 并提供提交登录的凭据后,有角度应用程序请求身份验证,它不会重定向回客户端应用程序。问题仅在 chrome 浏览器中(firefox 和 edge 工作正常)我可以看到重定向请求 - Request-Url 但它只是返回登录页面客户端配置:

public static IEnumerable<Client> GetClients()
{
    return new List<Client>(){
            new Client() {
                             RequireConsent =false,
                             RequireClientSecret = false,
                             ClientId = "takbull-clientapp-dev",
                             ClientName = "Takbull Client",
                             AllowedGrantTypes = GrantTypes.ImplicitAndClientCredentials,
                             AllowedScopes = new List<string> 
                             {
                              IdentityServerConstants.StandardScopes.OpenId,
                              IdentityServerConstants.StandardScopes.Email,
                              IdentityServerConstants.StandardScopes.Profile,
                              "takbull",
                              "takbull.api" 
                             },
                             // where to redirect to after login
                             RedirectUris = new List<string>()
                             {
                                 "http://localhost:4200/auth-callback/",
                                 "http://localhost:4200/silent-refresh.html",
                             },
                             //TODO: Add Production URL
                             // where to redirect to after logout
                             PostLogoutRedirectUris …
Run Code Online (Sandbox Code Playgroud)

.net-core identityserver4

10
推荐指数
3
解决办法
9402
查看次数

标签 统计

.net-core ×1

identityserver4 ×1