简体   繁体   中英

Redirect Keycloak to Custom Forgot Password

Hi I am using Keycloak for authentication. I have one separate service for forgot password. I want to redirect keycloak to that service when Forgot Password Link is clicked.

I dont want to use keycloak's forgot password service.

Please Help.

Keycloak's login page is built using Freemarker templates. These are stored in Themes folder inside Keycloak. You can edit these FLT files inside Keycloak's theme folder and make any changes you want - like adding a link to another URL/resource/etc.

The base login theme can be found here -

/standalone/configuration/themes/base/login/login.ftl

Themes can be deployed in multiple ways - as a folder/module/jar. They need to be dropped under -

standalone/configuration/themes

Under keycloak-9.0.3/themes/base/login/ you can find standard templates which names and content you can use for customization. Eg login-reset-password.ftl . Then it's recommended better to create a custom theme and under it copy/create your custom template.

At the end don't forget to change the "Login Theme" to your custom one on Keycloak Admin Panel under "Realm Settings" -> "Theme".

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM