Keycloakify
HomeGitHubStorybookStarter TemplateAlternative to keycloak-js
v10
  • Documentation
  • Release Notes & Upgrade Instructions
  • FAQ
v10
  • 👨‍💻Quick start
  • 🧪Testing your Theme
    • In Storybook
    • In a Keycloak Docker Container
    • With Vite or Webpack in dev mode
  • 🔩Integrating Keycloakify in your Codebase
    • In your React Project
      • In your Vite Project
      • In your Webpack Project
    • As a Subproject of your Monorepo
      • Turborepo
      • Nx Integrated Monorepo
      • Package Manager Workspaces
  • 🎨Customization Strategies
    • CSS Level Customization
      • Basic example
      • Removing the default styles
      • Applying your own classes
      • Page specific styles
      • Using Tailwind
      • Using custom assets
        • .css, .sass or .less
        • CSS-in-JS
    • Component Level Customization
      • Using custom assets
  • 🖋️Custom Fonts
  • 🌎Internationalization and Translations
  • 🎭Theme Variants
  • 📝Customizing the Register Page
  • 👤Account Theme
    • Single-Page
    • Multi-Page
  • 📄Terms and conditions
  • 🖇️Styling a Custom Page Not Included In Base Keycloak
  • 🔧Accessing the Server Environment Variables
  • 🎯Targetting Specific Keycloak Versions
  • 📧Email Customization
  • 🚛Passing URL Parameters to your Theme
  • 🤵Admin theme
  • 📥Importing the JAR of Your Theme Into Keycloak
  • 🔛Enabling your Theme in the Keycloak Admin Console
  • 🤓Taking ownership of the kcContext
  • 📖Configuration Options
    • --project
    • keycloakVersionTargets
    • environmentVariables
    • themeName
    • startKeycloakOptions
    • themeVersion
    • postBuild
    • XDG_CACHE_HOME
    • kcContextExclusionsFtl
    • keycloakifyBuildDirPath
    • groupId
    • artifactId
    • Webpack specific options
      • projectBuildDirPath
      • staticDirPathInProjectBuildDirPath
      • publicDirPath
  • FAQ & HELP
    • 😞Can't identify the page to customize?
    • 🤔How it Works
    • 😖Some values you need are missing from in kcContext type definitions?
    • ❓Can I use it with Vue or Angular
      • Angular
    • ⚠️Limitations
    • 🛑Errors Keycloak in Logs
    • 🙋How do I add extra pages?
    • 🤓Can I use react-hooks-form?
    • 🚀Redirecting you users to the login/register pages
    • 💟Contributing
    • ⬆️Migration Guides
      • ⬆️v9 -> v10
      • ⬆️CRA -> Vite
      • ⬆️v8 -> v9
      • ⬆️v7 -> v8
      • ⬆️v6 -> v7
      • ⬆️v6.x -> v6.12
      • ⬆️v5 -> v6
    • 🍪Google reCaptcha and End of third-party Cookies
    • 🔖Accessing the Realm Attributes
  • ⭐Sponsors
Powered by GitBook
On this page
  • Key Points Covered in the Video:
  • Update Strategies
  • Key Changes:

Was this helpful?

Edit on GitHub
  1. FAQ & HELP
  2. Migration Guides

v9 -> v10

Last updated 8 months ago

Was this helpful?

Keycloakify 10 has undergone significant changes compared to previous versions. The software has been nearly rewritten from the ground up, making it a more mature and stable solution. However, this also brings several breaking changes. Moving forward, Keycloakify will be more stable, and you shouldn’t have to endure a painful migration process to support the latest Keycloak versions.

This major breaking change was necessary to lay a strong foundation for the future of the project.

I’ve recorded a video summarizing all the changes. It’s quite detailed, so if you don’t have time to watch the entire video, you can refer to the updated documentation for a quicker overview:

Key Points Covered in the Video:

Update Strategies

When updating, I recommend starting fresh with the new starter and reapplying your custom changes.

  • If you only had a Keycloak theme:

Key Changes:

User Profile is Now the Default

  • The register-user-profile.ftl file has been renamed to register.ftl. The old register.ftl, where user attributes were hardcoded, has been removed.

  • The update-user-profile.ftl file has been renamed to login-update-profile.ftl, and the old login-update-profile.ftl has also been removed.

Don’t worry—Keycloakify still generates themes that are compatible with older Keycloak versions, including those that did not have the declarative User Profile feature.

Two Types of Account Themes

If you haven't created or customized an account theme, set accountThemeImplementation to "none" in your Keycloakify configuration. You can also remove the src/keycloak-theme/account directory if it exists.

vite.config.ts
import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
import { keycloakify } from "keycloakify/vite-plugin";

// https://vitejs.dev/config/
export default defineConfig({
    plugins: [
        react(),
        keycloakify({
            accountThemeImplementation: "none",
            //...
        })
    ]
});
package.json
{
    "keycloakify": {
        "accountThemeImplementation": "none"
    }
}

If you had an account theme, you must set accoutThemeImplementation to "Multi-Page":

vite.config.ts
import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
import { keycloakify } from "keycloakify/vite-plugin";

// https://vitejs.dev/config/
export default defineConfig({
    plugins: [
        react(),
        keycloakify({
            accountThemeImplementation: "Multi-Page",
            //...
        })
    ]
});
package.json
{
    "keycloakify": {
        "accountThemeImplementation": "Multi-Page"
    }
}

Keycloakify Components API Changes

The Keycloakify Component API and boilerplate have undergone several small adjustments.

Vite starter:

Webpack (Create React App) starter:

If you had Keycloakify installed in your web app: Follow this integration guide: .

You now have the option to choose between a Single Page Account Theme or a Multi-Page Account Theme. .

One of the most notable changes is the renaming of useGetClassName to getKcClsx. You can view the updated implementation here: is now .

For the latest code for the new pages, refer to this repository: .

It's crucial that you reapply your changes to the new Template.tsx instead of trying to modify your old Template.tsx to compile. You can find the updated template here: .

⬆️
⬆️
https://github.com/keycloakify/keycloakify-starter
https://github.com/keycloakify/keycloakify-starter-webpack
Integrating Keycloakify in your React project
See documentation
useGetClassName
getKcClsx
New Login Pages
New Template.tsx