Skip to content
Example of dynamically branded login theme for Keycloak
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
keycloak-theme-glutt Initial commit Oct 15, 2018
.gitignore Update Oct 15, 2018
pom.xml Initial commit Oct 15, 2018

Keycloak dynamic branding

In Keycloak, URI information is not passed by default to FTL templates, thus making it hard to implement dynamic theme branding. However, it's easy to push any arbitrary data, including URI info, to FTL context using Keycloak providers mechanism.

This example demonstrates this approach with dynamically branded login theme.


mvn clean install


cp */target/*.jar $KEYCLOAK/standalone/deployments


In standalone.xml (server/profile/subsystem[@xmlns="urn:jboss:domain:keycloak-server:1.1"]):

            <spi name="login">
                <provider name="freemarker+" enabled="true"/>

In Admin Console: realm settings → Themes → Login Theme = glutt


Try appending "glutt" parameter either to client URL or to Keycloak auth URL. For example:



This should change Keycloak logo to that of The World's Leading Glutt Producer™.

You can’t perform that action at this time.