我使用身份服务器 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)