Replies: 3 comments
-
Just wondering how you did this inside of your realm email templates, evaluating the client_id yourselves, was custom code required on the back end? |
Beta Was this translation helpful? Give feedback.
-
I would have also added provide ui for this instead of having to go to raw files @yanxch |
Beta Was this translation helpful? Give feedback.
-
Together with @olegkarpovich, we found a way to customize the email content based on the client ID directly within the ImplementationWe modified the <#import "template.ftl" as layout>
<@layout.emailLayout>
<h1>Magic Link for ${clientName}</h1>
<#if clientId == "client-a">
<p>Welcome to client-a. Click <a href="${magicLink}">this link</a> to log in.</p>
<#elseif clientId == "client-b">
<p>Welcome to client-b. Click <a href="${magicLink}">this link</a> to log in.</p>
<#else>
<p>Click <a href="${magicLink}">here</a> to log in.</p>
</#if>
</@layout.emailLayout> |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I would like to open this discussion and ask why it's not a valid use case in the perspective of keycloak to override email themes on a per client basis.
UseCases:
Mine:
We are a public transport service company and we collaborate with other public transport services to provide a unified platform where a customer can book any ticket from any provider.
One feature is to share the user base. So we are operating on the same realm. But every company has it's own brand that should be represented in the themes.
Currently we have logic inside of our realm email templates, evaluating the client_id ourselves, but with every new partner this is getting messier. Changes for one partner can have side effects for others.
From the PR KEYCLOAK-16201 Allow customized email themes on a per client basisΒ #7729
@stianst seems like you have a very strong opinion:
Maybe you can elaborate on this a bit.
What are the alternatives in your point of view? Thx
Ofc anybody who has insights is welcome to share her/his opinion.
Beta Was this translation helpful? Give feedback.
All reactions