我正在使用keycloak gatekeeper来保护一个简单的前端web应用程序,它工作得很好;用户在到达实际站点之前需要登录。
注销时出现问题。当我使用/oauth/logout URL时,它似乎会破坏应用程序中的本地会话,但实际上并不会将用户注销。下次刷新时,用户将再次登录。
我检查了keycloak网守日志,每当我点击注销URL时,我都会看到这个;
error invalid response from revocation endpoint {"status": 400, "response": "{\"error\":\"invalid_grant\",\"error_description\":\"Invalid refresh token\"}"}
error no session found in request, redirecting for authorization {"error": "authentication session not found"}
info issuing access token for user {"email": "test@test.com", "expires": "2019-11-08T12:11:35Z", "duration": "4m59.409151193s"}它看起来像是试图调用这个撤销url,但失败了,然后又让用户重新登录。问题是为什么对撤销url的调用失败。我没有设置任何自定义的东西,这只是keycloak + keycloak-gatekeeper,几乎是开箱即用的。
有谁能解释一下这件事吗?
这里是网守配置(部署在Kubernetes中);
secure-cookie: false
client-id: dashboard
client-secret: xxx
discovery-url: https://xxx/auth/realms/dashboard
enable-default-deny: true
encryption_key: xxx
listen: 0.0.0.0:3000
redirection-url: https://domain.tld
upstream-url: http://127.0.0.1:80发布于 2019-11-10 17:58:24
Invalid refresh token =>您需要启用刷新令牌:
enable-refresh-tokens: true
encryption-key: <your enryption key>https://stackoverflow.com/questions/58766503
复制相似问题