Keycloakify
GitHubHomeStarter project
v6
  • Documentation
  • Release Notes & Upgrade Instructions
  • FAQ
v6
  • 👨‍💻Quick start
  • 🔩Keycloakify in my App
  • 📧Email customization
  • ✒️Terms and conditions
  • ✅Realtime input validation
  • ⚠️Limitations
  • 🌉Context persistence
  • 🌎i18n: msg(...)
  • 💂Email domain acceptlist
  • 🛑Keycloak error in log
  • 💟Contributing
  • 📖Build options
  • 🏁Requirements
  • ⬆️v5 -> v6
  • ⬆️v6.x -> v6.12
Powered by GitBook
On this page
  • Some pages still have the default theme. Why?
  • process.env.PUBLIC_URL not supported.
  • Self hosted fonts
  • login and email only

Was this helpful?

Edit on GitHub

Limitations

PreviousRealtime input validationNextContext persistence

Last updated 2 years ago

Was this helpful?

Some pages still have the default theme. Why?

This project only support out of the box the most common user facing pages of Keycloak login.

To see the complete list of pages that Keycloak provide you can download the base theme with the following command

npx -p keycloakify download-builtin-keycloak-theme

Most Keycloakify component are based on the base theme of Keycloak v11.0.3 ().

are the pages currently implemented by this module.

I have established that a page that I need isn't supported out of the box by Keycloakify, now what?

Keycloakify also enables you to declare custom ftl pages.

Check out how my-extra-page-1.ftl and my-extra-page-2.ftl where added to .

Main takeaways are:

  • You must declare your custom pages in the package.json.

  • (TS only) You must declare theses page in the type argument of the getter function for the kcContext in order to have the correct typings.

  • (TS only) If you use Keycloak plugins that defines non standard .ftl values (Like for example that define authorizedMailDomains in register.ftl) you should declare theses value to get the type.

  • You should provide sample data for all the non standard value if you want to be able to debug the page outside of keycloak.

process.env.PUBLIC_URL not supported.

You won't be able to . (This isn't recommended anyway).

Self hosted fonts

If you are building the theme with this limitation doesn't apply, you can import fonts however you see fit.

This scenario won't work

fonts.css
@font-face {
  font-family: Marianne;
  src: url("./fonts/Marianne-Light.woff2") format("woff2");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
index.html
<link rel="stylesheet" href="%PUBLIC_URL%/font.css" />

This will:

index.html
-<link rel="stylesheet" href="%PUBLIC_URL%/font.css" />
+<style>
+ @font-face {
+   font-family: Marianne;
+   src: url("%PUBLIC_URL%/fonts/Marianne-Light.woff2") format("woff2");
+   font-weight: 300;
+   font-style: normal;
+   font-display: swap;
+ }
+</style>

Make sure %PUBLIC_URL%/fonts/Marianne-Light.woff2 actually point to the font file.

Other workarounds

  • If it is possible, use Google Fonts or any other font provider.

login and email only

As of now Keycloakify only enable you to create a theme that covers the Login pages and the emails. Acount and Admin Console aren't supported yet.

Example (and the font are ).

Use .

You can , you will need to enable for your font files, even on the same domain.

If you are missing this feature .

⚠️
here
here
use non relative url
Access-Control-Allow-Origin
open an issue about it
Video demo
Here
💟Contributing
the demo project
example
example
this plugin
example
example
import things from your public directory in your JavaScript code (it's supported in public/index.html)
--external-assets
--external-assets