Keycloakify
GitHubStorybookStarter projectKeycloak as a service
v7
  • Documentation
  • Release Notes & Upgrade Instructions
  • FAQ
v7
  • 👨‍💻Quick start
  • 🔩Keycloakify in my App
  • 📧Email customization
  • ✒️Terms and conditions
  • ✅Realtime input validation and custom registration fields
  • ⚠️Limitations
  • 🔧Environnement Variables
  • 🌎i18n: msg(...)
  • 📖Build options
  • 💂Email domain acceptlist
  • 🛑Keycloak error in log
  • 🌉Context persistence
  • 💟Contributing
  • 🤔How it works
  • ⬆️Migration guides
    • ⬆️v6 -> v7
    • ⬆️v6.x -> v6.12
    • ⬆️v5 -> v6
Powered by GitBook
On this page

Was this helpful?

Edit on GitHub

Keycloakify in my App

Collocating your App and your frontend code

PreviousQuick startNextEmail customization

Last updated 1 year ago

Was this helpful?

A Keycloakify theme do not need to be a standalone project. Under certain conditions you can collocate your React app and your Keycloak theme. This enable to design the Keycloak user facing pages like if they where any other page of your project. (it's what's implemented in ).

Currently you can only collocate your Keycloak theme with WebPack SPAs. Typically, projects. It's not the case of your project? Don't worry! You can still use Keycloakify but your theme will need to be a standalone project. Just follow .

We are working toward making Keycloakify agnostic to the project it's colocated with. This will enable collocation with Vite, Next, Gatsby...

Before moving on and setting up Keycloakify in your project, first, mess around with to familiarize yourself with Keycloakify.

Once you think you are ready to move on:

yarn add keycloakify

add the following script

package.json
{
  "scripts": {
     ...
     "prepare": "copy-keycloak-resources-to-public", //This is only for beeing able to test the theme locally in storybook or with an explicit mockPageId
     "build-keycloak-theme": "yarn build && keycloakify"
  }
}

Git ignore the keycloak build directory:

.gitignore
...
/build_keycloak

That's it. You can build your App as a Keycloak theme with yarn build-keycloak-theme Reproduce the directory structure of .

You can eject pages using the npx eject-keycloak-page command.

You might now want to have a look at the available build options:

🔩
the starter project
create-react-app
the instructions to make the starter project standalone
Follow the progress.
the starter project
the starter project
📖Build options
Cloud IAM - Keycloak Identity and Access Management as a Service
Feeling overwhelmed? Check out our exclusive sponsor's Cloud IAM consulting services to simplify your experience.
Logo