How to disable theme caching in keycloak 20 - keycloak

I am running keycloak 20.0.3 in docker with setting KC_CACHE: ispn
I have a few themes for the login page. How can I disable and clear theme caching ? Newer version of keycloak does not have standalone_ha.xml

Related

Enable internationalization in keycloak admin console 19.0.2

I've recently switched from keycloak 18.0.2 to 19.0.2 version.
In the old version I may enable internationalization in 'theme' tab.
In the new version this toggle is disappeared.
Where I can find it?
On the new UI you need to go to Realm Settings > Localization as you can seen in the image below:

Keycloak theme not updating for the realms login from applications

I have a KeyCloak 12.0.2 application running on docker. Now I am trying to update the themes for login screens for the Realms. Whenever I go and change the theme from Realm theme setting -
UC1 - Open KeyCloak instance, the properly selected theme login page will appear. No issues!
UC2 - Open my application, click login, and the login page will have KeyCloak theme always, even though I tried selecting the different theme for a master or the specific Realm.
This is the theme which is appearing on my login screen whenever I go here from any application which is configured to use KeyCloak as SSO, its regardless of which theme I select from the Realm setting always-
I have checked and configured on the KeyCloak login screen, the theme will change as per the selection of themes for the Master realm -
I have made changes into the standalone.xml file related to the theme cache as follows -
<theme>
<staticMaxAge>-1</staticMaxAge>
<cacheThemes>false</cacheThemes>
<cacheTemplates>false</cacheTemplates>
<welcomeTheme>${env.KEYCLOAK_WELCOME_THEME:keycloak}</welcomeTheme>
<default>${env.KEYCLOAK_DEFAULT_THEME:keycloak}</default>
<dir>${jboss.home.dir}/themes</dir>
</theme>
I am kind of stuck here as I have to add multiple themes based on the Realms I have in the KeyCloak. I also tried to restart the container in which KeyCloak is running but no luck.
After lots of digging, I found out that I was changing the theme in the wrong place. To update the theme of the SSO login page, you need to select the theme using - Realm -> Clients -> Appropriate Client Name -> Theme.
If you try to change the theme using Realm -> Realm Settings ->Themes, only the login screen for the Admin console will change.

Not able to enable Script Authenticator with Keycloak 8.0.1

Not able to enable Script Authenticator with Keycloak 8.0.1.
Tried usinng below option on standalone windows version -
standalone -Dkeycloak.profile.feature.scripts=enabled
It does not work. Had used similar option on Keyclaok 7.0, it was working
From version 8.x, in order to make your scripts available to Keycloak you need to deploy them to the server in the form of jar.
Refer documentation for details -
https://www.keycloak.org/docs/latest/server_development/#_script_providers

Keycloak : How to preview emails when working on a custom theme?

Is there a way to preview emails in Keycloak when you are working on a new custome theme ?
Thanks
You can launch maildev with Docker and configure the SMTP settings in Keycloak.
Regards,

Configuring Liferay 7.2 OpenID Connect for Keycloak?

I have a fresh Liferay 7.2 and Keycloak 7 install
I created a Keycloak Client for Liferay
I enable Openid Connect in Liferay
In Liferay I configure an OpenID Connect provider with the Keycloak OpenID Connect discovery endpoint
In Liferay
I click Login, Login is presented
I click OpenID Connect, OpenID Connect Login page is presented
I click Login with the Keycloak provider selected, the browser is redirected to the Keycloak log in page
I enter my user and password and Click log in
My browser is redirected back to Liferay
In the Liferay the console looks like this https://gist.github.com/smitopher/ca8bcb2ccb564eff3a42a1944e8daed7
and the browser shows a Liferay Internal Server Error message
Any suggestions?
Some further debugging shows that When Liferay calls the Keycloak token endpoint, Keycloak returns a 400 http status and an invalid grant message.
I ran into the same problem but later stumbled across a blog post showing a successful configuration which I've reproduced with Liferay 7.2 + Keycloak 4.8.
The key difference between the failures and successes appears to be skipping auto-discovery and instead to populate the individual settings directly. It would appear that Liferay doesn't like something in Keycloaks discovery endpoint.
I recommend updating the Keycloak version and checking the correct Liferay configuration by consulting the official Liferay documentation Authenticating with OpenID Connect. You can also consult the article How to connect Keycloak and Liferay via OpenID Connect
Remember that Keycloak and Liferay must be able to communicate with each other via the HTTP / HTTPS protocol.