How to add custom FTL pages in Keycloak?

Viewed 848

I want to add a custom FTL-page to the existing Keycloak pages. Let's call it 'special-number.ftl' that contains a form where you can enter a number and send it to the backend. The submit button should trigger custom java code that I wrote. How do I do this? How do I trigger a custom FTL-page to be shown and trigger some code I wrote with a click on the submit button?

1 Answers

Assuming you have created a page in your local, then run the following command from a cli:

docker cp special-number.ftl containerId:/opt/jboss/keycloak/themes/base/account

ContainerId will be your docker container id. In the above example, it is going to the base themes, you can change it to wherever you want it to go.

Related