Keycloakify
HomeGitHubStorybookAlternative to keycloak-js
v11
  • Documentation
  • Release Notes & Upgrade Instructions
  • FAQ
v11
  • Quick Start
  • CSS Customization
  • Testing your Theme
    • Outside of Keycloak
    • Inside of Keycloak
  • Deploying Your Theme
  • Integrating Keycloakify in your Codebase
    • Vite
    • Create-React-App / Webpack
    • yarn/npm/pnpm/bun Workspaces
    • Turborepo
    • Nx
    • Angular Workspace
  • Common Use Case Examples
    • Using a Component Library
    • Custom Fonts
    • Changing the background image
    • Adding your Logo
    • Using Tailwind
    • Dark Mode Persistence
  • Features
    • Internationalization and Translations
      • Basic principles
      • Previewing Your Pages in Different Languages
      • Adding New Translation Messages or Changing the Default Ones
      • Adding Support for Extra Languages
    • Theme Variants
    • Environment Variables
    • Styling a Custom Page Not Included in Base Keycloak
    • Integrating an Existing Theme into Your Keycloakify Project
    • Compiler Options
      • --project
      • keycloakVersionTargets
      • environmentVariables
      • themeName
      • startKeycloakOptions
      • themeVersion
      • accountThemeImplementation
      • postBuild
      • XDG_CACHE_HOME
      • kcContextExclusionsFtl
      • keycloakifyBuildDirPath
      • groupId
      • artifactId
      • Webpack specific options
        • projectBuildDirPath
        • staticDirPathInProjectBuildDirPath
        • publicDirPath
  • Page-Specific Guides
    • Registration Page
    • Terms and Conditions Page
  • Theme types
    • Differences Between Login Themes and Other Types of Themes
    • Account Theme
      • Single-Page
      • Multi-Page
    • Email Theme
    • Admin Theme
Powered by GitBook
On this page
  • Deciding if you need an account theme or not
  • Choosing an account theme type
  • Single Page
  • Multi Page

Was this helpful?

Edit on GitHub
  1. Theme types

Account Theme

Last updated 5 months ago

Was this helpful?

Deciding if you need an account theme or not

The first question you want to ask yourself is: "Do I really need an account theme?"

If you're looking to create an account theme just to allow your users to change their password, update account information such as email, phone number, favorite pets, etc., or delete their account, then you do not need an account theme.

There are pages in the login theme for those functions. You only need to add a button to redirect your user to the appropriate page in your main app. Here is how to do it with oidc-spa: .

An added benefit of not having an account theme is that you will reuse the exact same form that you created for the registration page in the login-update-profile.ftl page.

Consider creating an account theme only if you need to provide advanced account management features to your users, such as connection logs, management of active sessions, file uploads, etc.

Here is a video that explains this in detail:

Choosing an account theme type

Keycloakify provide you two ways to create your own account theme.

You can chose between two implementation of the account theme:

Single Page

Pros

  • Get's all the latest features.

  • The base code is maintained by the Keycloak team and automatically integrated into Keycloakify. You're using the real thing, not a fork.

  • If you're a React developper you'll feel right at home. It's uing i18n-next and react-router

Cons

  • Opting for this option will add a lot of dependencies to your project (i18n-next, react-router-dom, patenrnfly and more).

  • No Storybook integration.

  • Only available with React (Angular and Svelte not supported)

To get started with the Single-Page account theme:

Multi Page

This is a fork of the Account v1 maintained by the Keycloakify team.

Pros

  • Works exactly the same as the login theme, nothing new to learn.

  • Available in React, Angular and Svelte

  • Storybook support

  • CSS level customization support like in the login theme.

  • As it's maintained by us, we can guarenty a certain level of stability in future version of Keycloak.

  • Compatible with all Keycloak version.

  • Does not add any dependency to your project.

Cons

  • It relies on Java code maintained by us, this code uses Keycloak internal API, you have to trust us to keep maintaining it.

  • The default look is a bit dated.

To get started with the Multi-Page account theme:

The Single Page theme also refered as account v3 is this the default theme that comes with Keycloak 25. .

CSS level customization beyond is not practical, you'll have to customize at the React component level.

Don't come with all the feature out of the box yet. You'll have to use the .

But thanks to Keycloakify's compatiblity layer it works with older Keycloak versions down to 19
overidding the Paternfly CSS variables
Single-Page
Keycloak Account REST API if you want to implement the missing features
Multi-Page
Documentation
Screenshot of the Single Page Account theme