Keycloak服务器重新启动后,Keycloak访问令牌无效 [英] Keycloak access tokens invalid after Keycloak server restart
问题描述
我们在单页应用程序中使用Keycloak 3.4.0/Keycloak.js. Keycloak将其数据存储在MariaDB中.
We are using Keycloak 3.4.0 / Keycloak.js in our single page app. Keycloak stores its data within a MariaDB.
当我重新启动Keycloak服务器(NOT MariaDB)并刷新我的单页面应用程序时,我被重定向到登录页面.我想Keycloak将所有令牌存储在其数据库中,这些令牌在重启后不应该仍然有效吗?还是期望所有会话都注销?
When I restart the Keycloak server (NOT MariaDB) and refresh my single page app I am redirected to the login page. I thougt that Keycloak stores all tokens within its database, shouldn't these tokens still be valid after a restart? Or is it expected that all sessions are logged out?
我是否必须使用脱机令牌来支持这种情况?
Do I have to use offline tokens to support this scenario?
即使用户注销或服务器重新启动,脱机令牌也仍然有效. https://www.keycloak.org/docs/3.4/server_admin/index.html#_offline-access
The offline token is valid even after a user logout or server restart. https://www.keycloak.org/docs/3.4/server_admin/index.html#_offline-access
推荐答案
这是由成员之一
JPA用户会话提供者为 掉线(性能太差了,因此我们认为它不可用).用户 会话持久性仅用于脱机会话,它们可以在服务器上生存 重新启动.
The JPA user session provider was dropped (performance was horrible so we deemed it unusable). The user session persister is only used for offline sessions, they survive a server restart.
是的,似乎是由于与性能相关的问题,他们将其删除.在这里,您有了
So yes, it seems like they removed it because of performance related issues. Here you've got the whole thread.
这篇关于Keycloak服务器重新启动后,Keycloak访问令牌无效的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!