<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	
	xmlns:georss="http://www.georss.org/georss"
	xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#"
	>

<channel>
	<title>Themes - Inero Software - Software Consulting</title>
	<atom:link href="https://inero-software.com/tag/themes/feed/" rel="self" type="application/rss+xml" />
	<link>https://inero-software.com/tag/themes/</link>
	<description>We unleash innovations using cutting-edge technologies, modern design and AI</description>
	<lastBuildDate>Wed, 06 Nov 2024 07:27:45 +0000</lastBuildDate>
	<language>en-GB</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.1</generator>

<image>
	<url>https://inero-software.com/wp-content/uploads/2018/11/inero-logo-favicon.png</url>
	<title>Themes - Inero Software - Software Consulting</title>
	<link>https://inero-software.com/tag/themes/</link>
	<width>32</width>
	<height>32</height>
</image> 
<site xmlns="com-wordpress:feed-additions:1">153509928</site>	<item>
		<title>Customizing Your User Experience. How to Create and Apply Custom Themes in Keycloak</title>
		<link>https://inero-software.com/how-to-create-and-apply-custom-themes-in-keycloak/</link>
		
		<dc:creator><![CDATA[Marceli Formela]]></dc:creator>
		<pubDate>Mon, 02 Sep 2024 10:02:40 +0000</pubDate>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Company]]></category>
		<category><![CDATA[Keycloak]]></category>
		<category><![CDATA[Custom]]></category>
		<category><![CDATA[keycloak]]></category>
		<category><![CDATA[Themes]]></category>
		<guid isPermaLink="false">https://inero-software.com/?p=6059</guid>

					<description><![CDATA[<p>&#160;</p>
<p>Artykuł <a href="https://inero-software.com/how-to-create-and-apply-custom-themes-in-keycloak/">Customizing Your User Experience. How to Create and Apply Custom Themes in Keycloak</a> pochodzi z serwisu <a href="https://inero-software.com">Inero Software - Software Consulting</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>&nbsp;</p>
<div class="row"><div class="col-sm-1"></div><div class="col-sm-10">
<h4><span style="font-weight: 400;">In our last post (</span><a href="https://inero-software.com/exporting-accounts-to-federated-realms/"><span style="font-weight: 400;">Exporting accounts to federated realms: A guide to Keycloak and LDAP Integration</span></a><span style="font-weight: 400;">), we explored how to easily import users into our Keycloak server from another system using the LDAP protocol. This time, we’ll take a closer look at the visual aspect of this solution by customizing the stylesheet for our application and allowing the end-user to get a unique feeling when visiting our site. </span></h4>
<p>&nbsp;</p>
<h3><b>Built-in themes</b></h3>
<p><span style="font-weight: 400;">Keycloak offers extensive customization options for the user interface and appearance through its &#8220;themes.&#8221; Customizing themes allows us to tailor the look and feel of their applications to meet specific needs, not only reinforcing the brand&#8217;s visual identity. </span></p>
<p><span style="font-weight: 400;">Keycloak comes with several pre-built themes bundled within its distribution. The available themes include the base theme, which provides HTML templates and message bundles that all other themes, including custom ones, typically inherit from. The </span><b>keycloak</b><span style="font-weight: 400;"> theme contains images and stylesheets for enhancing page CSS and is used by default if no custom theme is provided. Additionally, the </span><b>keycloak.v2</b><span style="font-weight: 400;"> theme is a React-based theme designed for the new Admin Console, with the older console set for deprecation. Modifying existing themes is not recommended, instead creating a new theme that extends one of them is the preferred approach.</span></p>
<p><span style="font-weight: 400;">For a complete customization, copying the contents from the </span><b>base</b><span style="font-weight: 400;"> folder is ideal, but for partial modification, it&#8217;s more practical to start with the contents from the keycloak directory. As we&#8217;ve already said, only the parts of the theme that need to be overridden should be included in the new custom folder.</span></p>
<p>&nbsp;</p>
<h3><b>FreeMarker Template </b></h3>
<p><span style="font-weight: 400;">FTL themes in Keycloak refer to templates written in Freemarker Template Language that define the look and feel of various pages and emails in Keycloak. These themes allow you to customize everything from login pages to error messages and account management interfaces.</span></p>
<p><span style="font-weight: 400;">Keycloak themes are typically organized into four main categories:</span></p>
<ol>
<li><b>Login</b><span style="font-weight: 400;">: Customizes the appearance of login, registration, and password reset pages.</span></li>
<li><b>Account</b><span style="font-weight: 400;">: Modifies the user account management interface.</span></li>
<li><b>Email</b><span style="font-weight: 400;">: Tailors the content and appearance of emails sent by Keycloak (e.g., verification emails, password reset emails).</span></li>
<li><b>Admin</b><span style="font-weight: 400;">: Allows customization of the Keycloak Admin Console.</span></li>
</ol>
<p>&nbsp;</p>
<p><span style="font-weight: 400;">Let’s take a look at a few quite relevant templates:</span></p>
<ul>
<li style="font-weight: 400;" aria-level="1"><b>login.ftl</b><span style="font-weight: 400;"> &#8211; the most commonly customized template in Keycloak. It is responsible for rendering the login page where users enter their credentials (username/email and password) to access your application.</span></li>
</ul>
<ul>
<li aria-level="1"><b>register.ftl </b><span style="font-weight: 400;">&#8211; used for the registration page where new users can create an account.</span></li>
</ul>
<ul>
<li aria-level="1"><b>login-reset-password.ftl </b><span style="font-weight: 400;">&#8211; used when a user initiates the password reset process.</span></li>
</ul>
<ul>
<li aria-level="1"><b>login-update-password.ftl </b><span style="font-weight: 400;">&#8211;</span><span style="font-weight: 400;"> used when a user is required to update their password, either after a successful password reset or due to a policy requirement (e.g., periodic password changes).</span></li>
</ul>
<h3></h3>
<h3><b>Theme properties</b></h3>
<p><span style="font-weight: 400;">In addition to the HTML templates, message bundles, images and stylesheets, a Keycloak theme includes a few more elements like theme properties. Each theme type has its own configuration file. For instance, consider the theme.properties file from the login theme:</span></p>
<pre><i><span style="font-weight: 400;">parent=keycloak</span></i>
<i><span style="font-weight: 400;">import=common/keycloak</span></i>

<i><span style="font-weight: 400;">styles=css/login.css css/tile.css</span></i>
<i><span style="font-weight: 400;">stylesCommon=web_modules/@fortawesome/fontawesome-free/css/icons/all.css 
web_modules/@patternfly/react-core/dist/styles/base.css 
web_modules/@patternfly/react-core/dist/styles/app.css 
node_modules/patternfly/dist/css/patternfly.min.css 
node_modules/patternfly/dist/css/patternfly-additions.min.css lib/pficon/pficon.css</span></i></pre>
<p><span style="font-weight: 400;">This file shows that the theme inherits from the base theme to utilize its HTML templates and message bundles. It also imports the common theme to include additional styles. Beyond that, the theme specifies its own stylesheet, css/login.css.</span></p>
<p>&nbsp;</p>
<h3><b>Messages and i18n</b></h3>
<p><span style="font-weight: 400;">Keycloak supports internationalization in themes by allowing you to create language-specific properties files, which store translations for text used in templates. These files, named </span><b>messages_&lt;locale&gt;.properties</b><span style="font-weight: 400;"> contain key-value pairs where the key represents a text element, and the value is its translation in the target language. In our FTL templates, we reference these keys using the </span><b>${msg()}</b><span style="font-weight: 400;"> directive, allowing our application to automatically display the appropriate translation.</span></p>
<p><span style="font-weight: 400;">It should refer to the language currently selected by the user. Keycloak determines the language based on browser settings, provided that the language is configured in the system.</span></p>
<p><span style="font-weight: 400;">For example, on the login page, you can provide a translation for the header &#8220;Sign in to your account,&#8221; which may not be translated by default in languages like Dutch or Spanish. To do this, you can edit the </span><b>loginAccountTitle</b><span style="font-weight: 400;"> field in the messages file, adding the appropriate translation for each language. This way, when users select their language, they will see the translated version in the login interface.</span></p>
<pre><i><span style="font-weight: 400;">messages.nl</span></i>
<i><span style="font-weight: 400;">loginAccountTitle=Inloggen</span></i>

<i><span style="font-weight: 400;">messages.es</span></i>
<i><span style="font-weight: 400;">loginAccountTitle=Iniciar sesi\u00F3n</span></i>

<i><span style="font-weight: 400;">messages.en</span></i>
<i><span style="font-weight: 400;">loginAccountTitle=Sign In</span></i></pre>
<p><span style="font-weight: 400;">The final step is to configure the internationalization settings for your realm according to the provided screenshot. This ensures that the translations you added, such as for the loginAccountTitle field, are correctly applied based on the user&#8217;s selected language.</span></p>
<p><img fetchpriority="high" decoding="async" data-attachment-id="6061" data-permalink="https://inero-software.com/how-to-create-and-apply-custom-themes-in-keycloak/1-10/" data-orig-file="https://inero-software.com/wp-content/uploads/2024/08/1.png" data-orig-size="1920,1080" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="1" data-image-description="" data-image-caption="" data-medium-file="https://inero-software.com/wp-content/uploads/2024/08/1-300x169.png" data-large-file="https://inero-software.com/wp-content/uploads/2024/08/1-1030x579.png" tabindex="0" role="button" class="alignnone wp-image-6061 aligncenter" src="https://inero-software.com/wp-content/uploads/2024/08/1-300x169.png" alt="" width="604" height="340" srcset="https://inero-software.com/wp-content/uploads/2024/08/1-300x169.png 300w, https://inero-software.com/wp-content/uploads/2024/08/1-1030x579.png 1030w, https://inero-software.com/wp-content/uploads/2024/08/1-768x432.png 768w, https://inero-software.com/wp-content/uploads/2024/08/1-1536x864.png 1536w, https://inero-software.com/wp-content/uploads/2024/08/1-533x300.png 533w, https://inero-software.com/wp-content/uploads/2024/08/1.png 1920w" sizes="(max-width: 604px) 100vw, 604px" /></p>
<p><span style="font-weight: 400;">The original English version and the final result for the Spanish and Dutch versions is shown below.</span></p>
<p><img decoding="async" data-attachment-id="6068" data-permalink="https://inero-software.com/how-to-create-and-apply-custom-themes-in-keycloak/8-2/" data-orig-file="https://inero-software.com/wp-content/uploads/2024/08/8.png" data-orig-size="1037,569" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="8" data-image-description="" data-image-caption="" data-medium-file="https://inero-software.com/wp-content/uploads/2024/08/8-300x165.png" data-large-file="https://inero-software.com/wp-content/uploads/2024/08/8-1030x565.png" tabindex="0" role="button" class="alignnone wp-image-6068 aligncenter" src="https://inero-software.com/wp-content/uploads/2024/08/8-300x165.png" alt="" width="478" height="263" srcset="https://inero-software.com/wp-content/uploads/2024/08/8-300x165.png 300w, https://inero-software.com/wp-content/uploads/2024/08/8-1030x565.png 1030w, https://inero-software.com/wp-content/uploads/2024/08/8-768x421.png 768w, https://inero-software.com/wp-content/uploads/2024/08/8-547x300.png 547w, https://inero-software.com/wp-content/uploads/2024/08/8.png 1037w" sizes="(max-width: 478px) 100vw, 478px" /></p>
<p><img decoding="async" data-attachment-id="6069" data-permalink="https://inero-software.com/how-to-create-and-apply-custom-themes-in-keycloak/9-2/" data-orig-file="https://inero-software.com/wp-content/uploads/2024/08/9.png" data-orig-size="1053,558" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="9" data-image-description="" data-image-caption="" data-medium-file="https://inero-software.com/wp-content/uploads/2024/08/9-300x159.png" data-large-file="https://inero-software.com/wp-content/uploads/2024/08/9-1030x546.png" tabindex="0" role="button" class=" wp-image-6069 aligncenter" src="https://inero-software.com/wp-content/uploads/2024/08/9-300x159.png" alt="" width="525" height="278" srcset="https://inero-software.com/wp-content/uploads/2024/08/9-300x159.png 300w, https://inero-software.com/wp-content/uploads/2024/08/9-1030x546.png 1030w, https://inero-software.com/wp-content/uploads/2024/08/9-768x407.png 768w, https://inero-software.com/wp-content/uploads/2024/08/9-566x300.png 566w, https://inero-software.com/wp-content/uploads/2024/08/9.png 1053w" sizes="(max-width: 525px) 100vw, 525px" /></p>
<p><img loading="lazy" decoding="async" data-attachment-id="6070" data-permalink="https://inero-software.com/how-to-create-and-apply-custom-themes-in-keycloak/5-4/" data-orig-file="https://inero-software.com/wp-content/uploads/2024/09/5.png" data-orig-size="997,948" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="5" data-image-description="" data-image-caption="" data-medium-file="https://inero-software.com/wp-content/uploads/2024/09/5-300x285.png" data-large-file="https://inero-software.com/wp-content/uploads/2024/09/5.png" tabindex="0" role="button" class="alignnone wp-image-6070 aligncenter" src="https://inero-software.com/wp-content/uploads/2024/09/5-300x285.png" alt="" width="524" height="497" srcset="https://inero-software.com/wp-content/uploads/2024/09/5-300x285.png 300w, https://inero-software.com/wp-content/uploads/2024/09/5-768x730.png 768w, https://inero-software.com/wp-content/uploads/2024/09/5-316x300.png 316w, https://inero-software.com/wp-content/uploads/2024/09/5.png 997w" sizes="(max-width: 524px) 100vw, 524px" /></p>
<h3><b>Customizing our theme</b></h3>
<p><span style="font-weight: 400;">Before diving into theme customization, ensure you have a working Keycloak instance. You&#8217;ll need access to the Keycloak server files and administrative privileges to apply the theme. If you&#8217;re running Keycloak in a Docker container, you can use a volume mount to access the theme files on your local machine.</span></p>
<p><span style="font-weight: 400;">Create a directory structure for your custom theme by following the example below. The default theme files are located in the Keycloak server distribution under </span><b><i>themes/keycloak/login</i></b><span style="font-weight: 400;">. To get started, copy these default theme files from the Keycloak distribution to your custom theme directory.</span></p>
<p><img loading="lazy" decoding="async" data-attachment-id="6066" data-permalink="https://inero-software.com/how-to-create-and-apply-custom-themes-in-keycloak/6-3/" data-orig-file="https://inero-software.com/wp-content/uploads/2024/08/6.png" data-orig-size="966,1080" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="6" data-image-description="" data-image-caption="" data-medium-file="https://inero-software.com/wp-content/uploads/2024/08/6-268x300.png" data-large-file="https://inero-software.com/wp-content/uploads/2024/08/6-921x1030.png" tabindex="0" role="button" class="alignnone wp-image-6066 aligncenter" src="https://inero-software.com/wp-content/uploads/2024/08/6-268x300.png" alt="" width="375" height="420" srcset="https://inero-software.com/wp-content/uploads/2024/08/6-268x300.png 268w, https://inero-software.com/wp-content/uploads/2024/08/6-921x1030.png 921w, https://inero-software.com/wp-content/uploads/2024/08/6-768x859.png 768w, https://inero-software.com/wp-content/uploads/2024/08/6.png 966w" sizes="(max-width: 375px) 100vw, 375px" /></p>
<p><span style="font-weight: 400;">We’ll start with the basic login page, as shown below:</span></p>
<p><img loading="lazy" decoding="async" data-attachment-id="6063" data-permalink="https://inero-software.com/how-to-create-and-apply-custom-themes-in-keycloak/3-9/" data-orig-file="https://inero-software.com/wp-content/uploads/2024/08/3.png" data-orig-size="1920,1080" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="3" data-image-description="" data-image-caption="" data-medium-file="https://inero-software.com/wp-content/uploads/2024/08/3-300x169.png" data-large-file="https://inero-software.com/wp-content/uploads/2024/08/3-1030x579.png" tabindex="0" role="button" class="wp-image-6063 aligncenter" src="https://inero-software.com/wp-content/uploads/2024/08/3-300x169.png" alt="" width="737" height="415" srcset="https://inero-software.com/wp-content/uploads/2024/08/3-300x169.png 300w, https://inero-software.com/wp-content/uploads/2024/08/3-1030x579.png 1030w, https://inero-software.com/wp-content/uploads/2024/08/3-768x432.png 768w, https://inero-software.com/wp-content/uploads/2024/08/3-1536x864.png 1536w, https://inero-software.com/wp-content/uploads/2024/08/3-533x300.png 533w, https://inero-software.com/wp-content/uploads/2024/08/3.png 1920w" sizes="(max-width: 737px) 100vw, 737px" /></p>
<p>&nbsp;</p>
<p><span style="font-weight: 400;">Locate and edit the CSS file that controls the styling of the login page. This is typically named </span><b>login.css</b><span style="font-weight: 400;"> and is found in the </span><b>resources/css</b><span style="font-weight: 400;"> directory of your custom theme. Now we can change background property and provide a custom .png file.</span></p>
<pre><i><span style="font-weight: 400;">.login-pf-page::before {</span></i>
<i><span style="font-weight: 400;">content: "";</span></i>
<i><span style="font-weight: 400;">position: absolute;</span></i>
<i><span style="font-weight: 400;">top: 0;</span></i>
<i><span style="font-weight: 400;">left: 0;</span></i>
<i><span style="font-weight: 400;">width: 100%;</span></i>
<i><span style="font-weight: 400;">height: 100%;  </span></i>
<i><span style="font-weight: 400;">opacity: 1;</span></i>
<b><i>background: rgba(255, 255, 255, 0.4) url("../img/fb-background.png") no-repeat;</i></b>
<i><span style="font-weight: 400;">background-size: cover;</span></i>
<i><span style="font-weight: 400;">    </span></i> <i><span style="font-weight: 400;">z-index: -1;</span></i>
<i><span style="font-weight: 400;">}</span></i></pre>
<p><span style="font-weight: 400;">In addition to changing the background, we can also modify the color of the top border of the login screen and the color of the login button. Then we can add a custom logo. This can be done by modifying the following classes:</span><i></i></p>
<pre><i><span style="font-weight: 400;">pf-m-primary {</span></i>
<i><span style="font-weight: 400;">color: black !important;</span></i>
<b><i>background-color: #B646AE !important;</i></b>
<i><span style="font-weight: 400;">}
</span></i>
<i><span style="font-weight: 400;">.card-pf {</span></i>
<i><span style="font-weight: 400;">margin: 0 auto;</span></i>
<i><span style="font-weight: 400;">box-shadow: var(--pf-global--BoxShadow--lg);</span></i>
<i><span style="font-weight: 400;">padding: 0 20px;</span></i>
<i><span style="font-weight: 400;">max-width: 500px;</span></i>
<i><span style="font-weight: 400;">border-top: 4px solid;</span></i>
<b><i>border-color: #B646AE;</i></b>
<i><span style="font-weight: 400;">background-color: #fff;</span></i>
<i><span style="font-weight: 400;">}</span></i>

<i><span style="font-weight: 400;">#kc-header-wrapper::before {</span></i>
<i><span style="font-weight: 400;">content: "";</span></i>
<i><span style="font-weight: 400;">position: relative;</span></i>
<i><span style="font-weight: 400;">margin: auto;</span></i>
<i><span style="font-weight: 400;">display: block;</span></i>
<i><span style="font-weight: 400;">width: 200px;</span></i>
<b><i>background: url("../img/fb-logo.png") no-repeat;</i></b>
<i><span style="font-weight: 400;">background-size: auto;</span></i>
<i><span style="font-weight: 400;">}</span></i></pre>
<p><span style="font-weight: 400;">The last step will be to activate the custom theme in the administrator console for a specific realm.</span></p>
<p><img loading="lazy" decoding="async" data-attachment-id="6062" data-permalink="https://inero-software.com/how-to-create-and-apply-custom-themes-in-keycloak/2-10/" data-orig-file="https://inero-software.com/wp-content/uploads/2024/08/2.png" data-orig-size="1920,955" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="2" data-image-description="" data-image-caption="" data-medium-file="https://inero-software.com/wp-content/uploads/2024/08/2-300x149.png" data-large-file="https://inero-software.com/wp-content/uploads/2024/08/2-1030x512.png" tabindex="0" role="button" class="alignnone wp-image-6062 aligncenter" src="https://inero-software.com/wp-content/uploads/2024/08/2-300x149.png" alt="" width="587" height="292" srcset="https://inero-software.com/wp-content/uploads/2024/08/2-300x149.png 300w, https://inero-software.com/wp-content/uploads/2024/08/2-1030x512.png 1030w, https://inero-software.com/wp-content/uploads/2024/08/2-768x382.png 768w, https://inero-software.com/wp-content/uploads/2024/08/2-1536x764.png 1536w, https://inero-software.com/wp-content/uploads/2024/08/2-603x300.png 603w, https://inero-software.com/wp-content/uploads/2024/08/2.png 1920w" sizes="(max-width: 587px) 100vw, 587px" /></p>
<p><span style="font-weight: 400;">After the above changes, the final effect should look like this:</span></p>
<p><img loading="lazy" decoding="async" data-attachment-id="6067" data-permalink="https://inero-software.com/how-to-create-and-apply-custom-themes-in-keycloak/7-3/" data-orig-file="https://inero-software.com/wp-content/uploads/2024/08/7.png" data-orig-size="1920,1080" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="7" data-image-description="" data-image-caption="" data-medium-file="https://inero-software.com/wp-content/uploads/2024/08/7-300x169.png" data-large-file="https://inero-software.com/wp-content/uploads/2024/08/7-1030x579.png" tabindex="0" role="button" class="aligncenter wp-image-6067 size-full" src="https://inero-software.com/wp-content/uploads/2024/08/7.png" alt="" width="1920" height="1080" srcset="https://inero-software.com/wp-content/uploads/2024/08/7.png 1920w, https://inero-software.com/wp-content/uploads/2024/08/7-300x169.png 300w, https://inero-software.com/wp-content/uploads/2024/08/7-1030x579.png 1030w, https://inero-software.com/wp-content/uploads/2024/08/7-768x432.png 768w, https://inero-software.com/wp-content/uploads/2024/08/7-1536x864.png 1536w, https://inero-software.com/wp-content/uploads/2024/08/7-533x300.png 533w" sizes="(max-width: 1920px) 100vw, 1920px" /></p>
<p><span style="font-weight: 400;">However, the final result can vary depending on the use of different image files and color definitions. By customizing these elements, you can easily achieve a unique appearance that aligns with your branding and design preferences. Just with different resources it can look like this:</span></p>
<p><img loading="lazy" decoding="async" data-attachment-id="6064" data-permalink="https://inero-software.com/how-to-create-and-apply-custom-themes-in-keycloak/4-7/" data-orig-file="https://inero-software.com/wp-content/uploads/2024/08/4.png" data-orig-size="1920,1080" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="4" data-image-description="" data-image-caption="" data-medium-file="https://inero-software.com/wp-content/uploads/2024/08/4-300x169.png" data-large-file="https://inero-software.com/wp-content/uploads/2024/08/4-1030x579.png" tabindex="0" role="button" class="alignnone wp-image-6064 size-full" src="https://inero-software.com/wp-content/uploads/2024/08/4.png" alt="" width="1920" height="1080" srcset="https://inero-software.com/wp-content/uploads/2024/08/4.png 1920w, https://inero-software.com/wp-content/uploads/2024/08/4-300x169.png 300w, https://inero-software.com/wp-content/uploads/2024/08/4-1030x579.png 1030w, https://inero-software.com/wp-content/uploads/2024/08/4-768x432.png 768w, https://inero-software.com/wp-content/uploads/2024/08/4-1536x864.png 1536w, https://inero-software.com/wp-content/uploads/2024/08/4-533x300.png 533w" sizes="(max-width: 1920px) 100vw, 1920px" /></p>
<p><span style="font-weight: 400;">As you can see now, customizing the Keycloak theme is pretty straightforward.</span></p>
<p>&nbsp;</p>
<p><span style="font-weight: 400;">So far, we discussed how to customize Keycloak themes by adjusting visual elements. We covered the basics of Keycloak&#8217;s built-in themes, which include options for customizing the login page. In most cases, the process involves copying default theme files, modifying CSS for styling changes like background images and button colors, and editing FreeMarker templates for layout adjustments. Additionally, we explored how to use the theme.properties file to configure your custom theme. Now we have some basic tools to modify Keycloak&#8217;s appearance to better fit the brand and user needs.</span></p>
<p>&nbsp;</p>
<h3><strong>Summary</strong></h3>
<ul>
<li style="font-weight: 400;" aria-level="1"><span style="font-weight: 400;">You can fully customize the login page to ensure it doesn&#8217;t resemble a Keycloak default theme. This not only improves the user experience but also helps users easily distinguish the legitimate login page from potential phishing attempts.</span></li>
<li style="font-weight: 400;" aria-level="1"><span style="font-weight: 400;">Keycloak also allows you to customize the content and layout of email (i.e. password reset templates). By making unique, branded content you can help users recognize legitimate password reset requests, reducing the risk of falling victim to phishing attacks that mimic these emails.</span></li>
<li style="font-weight: 400;" aria-level="1"><span style="font-weight: 400;">Beyond visual customization, themes support internationalization, enabling you to provide users with a familiar experience in their native language. This can include translating all text on login pages and in emails to the appropriate language. It enhances usability for global users.</span></li>
</ul>
<p><span style="font-weight: 400;">Overall, customizing themes offers a range of possibilities to enhance the user experience and security of your IAM system.</span></p>
<h3>Do you need assistance with Keycloak implementation, updates, or training? Contact me</h3>
<p><span style="font-size: 8.0pt; font-family: 'Calibri',sans-serif; color: black;">             <img loading="lazy" decoding="async" data-attachment-id="5903" data-permalink="https://inero-software.com/?attachment_id=5903" data-orig-file="https://inero-software.com/wp-content/uploads/2024/06/Andrzej-Chybicki-PhD-Eng.-1.png" data-orig-size="1200,1200" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="Andrzej Chybicki PhD Eng. (1)" data-image-description="" data-image-caption="" data-medium-file="https://inero-software.com/wp-content/uploads/2024/06/Andrzej-Chybicki-PhD-Eng.-1-300x300.png" data-large-file="https://inero-software.com/wp-content/uploads/2024/06/Andrzej-Chybicki-PhD-Eng.-1-1030x1030.png" tabindex="0" role="button" class="size-medium wp-image-5903 alignleft" src="https://inero-software.com/wp-content/uploads/2024/06/Andrzej-Chybicki-PhD-Eng.-1-300x300.png" alt="" width="300" height="300" srcset="https://inero-software.com/wp-content/uploads/2024/06/Andrzej-Chybicki-PhD-Eng.-1-300x300.png 300w, https://inero-software.com/wp-content/uploads/2024/06/Andrzej-Chybicki-PhD-Eng.-1-1030x1030.png 1030w, https://inero-software.com/wp-content/uploads/2024/06/Andrzej-Chybicki-PhD-Eng.-1-80x80.png 80w, https://inero-software.com/wp-content/uploads/2024/06/Andrzej-Chybicki-PhD-Eng.-1-768x768.png 768w, https://inero-software.com/wp-content/uploads/2024/06/Andrzej-Chybicki-PhD-Eng.-1-75x75.png 75w, https://inero-software.com/wp-content/uploads/2024/06/Andrzej-Chybicki-PhD-Eng.-1-50x50.png 50w, https://inero-software.com/wp-content/uploads/2024/06/Andrzej-Chybicki-PhD-Eng.-1-512x512.png 512w, https://inero-software.com/wp-content/uploads/2024/06/Andrzej-Chybicki-PhD-Eng.-1-1024x1024.png 1024w, https://inero-software.com/wp-content/uploads/2024/06/Andrzej-Chybicki-PhD-Eng.-1.png 1200w" sizes="(max-width: 300px) 100vw, 300px" /></span></p>
<p><strong>Andrzej Chybicki </strong></p>
<p>CEO, Inero Software Sp. z o. o.<br />
andy@inero-software.com<br />
Phone: +48 695 875 588</p>
<p><a href="https://www.linkedin.com/in/andrzej-chybicki/"><img loading="lazy" decoding="async" data-attachment-id="5897" data-permalink="https://inero-software.com/?attachment_id=5897" data-orig-file="https://inero-software.com/wp-content/uploads/2024/06/logo-linkedin.png" data-orig-size="100,100" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="logo linkedin" data-image-description="" data-image-caption="" data-medium-file="https://inero-software.com/wp-content/uploads/2024/06/logo-linkedin.png" data-large-file="https://inero-software.com/wp-content/uploads/2024/06/logo-linkedin.png" tabindex="0" role="button" class="alignnone size-full wp-image-5897" src="https://inero-software.com/wp-content/uploads/2024/06/logo-linkedin.png" alt="" width="100" height="100" srcset="https://inero-software.com/wp-content/uploads/2024/06/logo-linkedin.png 100w, https://inero-software.com/wp-content/uploads/2024/06/logo-linkedin-80x80.png 80w, https://inero-software.com/wp-content/uploads/2024/06/logo-linkedin-75x75.png 75w, https://inero-software.com/wp-content/uploads/2024/06/logo-linkedin-50x50.png 50w" sizes="(max-width: 100px) 100vw, 100px" /></a></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p></p></div><div class="col-sm-1"></div></div>
<p>Artykuł <a href="https://inero-software.com/how-to-create-and-apply-custom-themes-in-keycloak/">Customizing Your User Experience. How to Create and Apply Custom Themes in Keycloak</a> pochodzi z serwisu <a href="https://inero-software.com">Inero Software - Software Consulting</a>.</p>
]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">6059</post-id>	</item>
	</channel>
</rss>
