This is the documentation for v6, checkout the latest version
Keycloakify
HomeGitHubStartersStorybookDiscordKeycloak-js Alternative
v5
  • Keycloakify
  • Release Notes & Upgrade Instructions
  • FAQ
v5
  • ๐ŸRequirements
  • ๐Ÿ‘จโ€๐Ÿ’ป๐Ÿ‘จ๐Ÿ’ป Quick start
  • ๐ŸงชDevelopment
  • ๐Ÿ“งEmail customization
  • โœ’๏ธTerms and conditions
  • โœ…Realtime input validation
  • โš ๏ธLimitations
  • ๐ŸŒ‰Context persistence
  • ๐ŸŒAdding i18n messages keys
  • โšกPerformance optimization
  • ๐Ÿ’‚Email domain acceptlist
  • ๐Ÿ›‘Keycloak error in log
  • ๐Ÿ’ŸContributing
Powered by GitBook
On this page

Was this helpful?

Performance optimization

Enable loading in a blink of an eye of login pages with --external-assets

PreviousAdding i18n messages keysNextEmail domain acceptlist

Last updated 27 days ago

Was this helpful?

This only apply if your theme is integrated to to a React app.

If your Keycloak theme is a standalone react project you can ignore this section.

By default when your users reach the login pages all scripts, images and stylesheet are downloaded from the Keycloak server. If you are specifically building a theme to integrate with an app or a website that allows users to browse unauthenticated before logging in, you will get a significant performance boost if you jump through those hoops:

  • Provide the url of your app in the homepage field of package.json. or in a public/CNAME file. .

  • Build the theme using npx build-keycloak-theme --external-assets

  • Enable on the server hosting your app. .

  • Make sure not to build your app and the keycloak theme separately (run yarn keycloak only once in your CI) and remember to update the Keycloak theme every time you update your app.

  • Be mindful that if your app is down your login pages are down as well.

Checkout a complete setup

โšก
ex
ex
ex
long-term assets caching
This is how you would do it with Ngnix
here