There are two ways you can create a Keycloak Email theme with Keycloakify
keycloakify-emailarrow-up-right is a Keycloakify plugin that enable to create an email theme using jsx-emailarrow-up-right or any other email templating solution.
This plugin will evenutally be integrated to Keycloakify core.
This approach only works in Vite project. So not with Webpack/Create-React-App
For react, there is a working example in the /example directory of keycloakify-emails that uses jsx-email https://github.com/timofei-iatsenko/keycloakify-emailsarrow-up-right
npx keycloakify initialize-email-theme, select the native option.
npx keycloakify initialize-email-theme
native
Running this command will initialize a native email theme in the src/email directory.
src/email
To use images you can put them into src/email/resources/ example:
And then you can import them using the FreeMarker varialble url.resourcesUrl. Example:
url.resourcesUrl
Last updated 1 month ago
Was this helpful?