authentication - How to dynamically set keycloak theme from the URL? - Stack Overflow

admin2025-04-22  0

I am been looking at keycloak documentation, and while I have figured out how to create custom login pages, I can not seem to find the way to send information to keycloak, in the url, about what theme to use. I have a dark theme and a light theme on my website, and I want it so that when the user goes to keycloak from either dark mode or light mode, that keycloak page matches what is from my website. The only thing I found was about some argument to pass in the url of kc_theme='name of theme', but that does not seem to be working.

"http://localhost:8081/realms/customer-portal/protocol/openid-connect/auth?client_id=customer-portal&redirect_uri=http%3A%2F%2Flocalhost%3A3000%2Fapi%2Flogin-callback&response_type=code&scope=openid&login_theme=my-dark-theme&prompt=login".

What can I do to fix this?

转载请注明原文地址:http://conceptsofalgorithm.com/Algorithm/1745251645a292543.html

最新回复(0)