Keycloak v26.0.2自定义主题登出页面样式不生效问题
自定义Keycloak登出主题不生效问题
我创建了一个自定义Keycloak主题,在管理控制台配置登录主题后,登录、注册页面样式正常生效。启用登出确认流程后,在登录/注册页面的同目录下创建了logout.ftl文件自定义登出页面样式,但登出页面仍使用默认样式。已尝试移除图标、样式等文件引用,改用极简版logout.ftl,问题依旧。
极简版logout.ftl代码
<!DOCTYPE html> <html lang="${locale!'en'}"> <head> <meta charset="utf-8"> <title>Logout - Confirm</title> <link rel="stylesheet" href="/themes/custom-theme/resources/css/styles.css"> </head> <body> <div class="logout-container"> <h1>Are you sure you want to log out?</h1> <p>You are about to log out of your session.</p> <form action="${url.logoutAction}" method="POST"> <button type="submit">Yes, log me out</button> </form> <form action="${url.cancelAction}" method="POST"> <button type="submit">No, keep me logged in</button> </form> </div> </body> </html>
主题文件夹结构
- custom-theme/
- login/
- resources/
- css/
- styles.css
- css/
- login.ftl
- register.ftl
- logout.ftl
- resources/
- theme.properties
- login/
如需更多信息,我可以提供!
内容的提问来源于stack exchange,提问作者P D
相关产品推荐
相关产品推荐

