🔩Keycloakify in my App
Collocating your App and your frontend code
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 the starter project).
Before moving on and setting up Keycloakify in your project, first, mess around with the starter project to familiarize yourself with Keycloakify.
Once you think you are ready to move on:
yarn add keycloakifyadd the following script
{
"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:
...
/build_keycloakThat's it. You can build your App as a Keycloak theme with yarn build-keycloak-theme
Reproduce the directory structure of the starter project.
You can eject pages using the npx eject-keycloak-page command.
You might now want to have a look at the available build options:
📖Build optionsLast updated
Was this helpful?
