Unable to create custom react login page for keycloakify

I am trying to create custom login page for keycloak but I am not able to do it. When I go to login page I still see default login page I am not able to find any resources or tutorials online. Can someone please let me know what I am doing wrong or is there something I am missing?

Github code: App.js · GitHub

I also tried adding this line in package.json:
in scripts:

    "keycloak": "react-scripts build && build-keycloak-theme"

and also added this in package.json:

"keycloakify": {
    "extraPages": [

After doing above things I tried npm run keycloak but it creates build folder and build_keycloak folder but I get message build keycloak theme failed any idea why so?


Error: ENOENT: no such file or directory, scandir 'D:\Keycloak\myapp\build_keycloak\src\main\resources\theme\myapp\tmp_xxKdLpdIdLd\keycloak\login\resources'
    at Object.readdirSync (fs.js:1043:3)
    at crawlRec (D:\Keycloak\myapp\node_modules\keycloakify\bin\tools\crawl.js:41:39)
    at crawl (D:\Keycloak\myapp\node_modules\keycloakify\bin\tools\crawl.js:61:9)
    at transformCodebase (D:\Keycloak\myapp\node_modules\keycloakify\bin\tools\transformCodebase.js:48:50)
    at generateKeycloakThemeResources (D:\Keycloak\myapp\node_modules\keycloakify\bin\build-keycloak-theme\generateKeycloakThemeResources.js:124:51)
    at main (D:\Keycloak\myapp\node_modules\keycloakify\bin\build-keycloak-theme\build-keycloak-theme.js:57:73)
    at Object.<anonymous> (D:\Keycloak\myapp\node_modules\keycloakify\bin\build-keycloak-theme\index.js:17:37)
    at Module._compile (internal/modules/cjs/loader.js:1085:14)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
    at Module.load (internal/modules/cjs/loader.js:950:32) {
  errno: -4058,
  syscall: 'scandir',
  code: 'ENOENT',
  path: 'D:\\Keycloak\\myapp\\build_keycloak\\src\\main\\resources\\theme\\myapp\\tmp_xxKdLpdIdLd\\keycloak\\login\\resources'

You seem to have the same issue that another user, I invite you to follow the resolution there.

I am not able to find any resources or tutorials online.

There is the readme of the project and a demo setup you can start from.
Beyond that, everything we do is open source and documented. You can actually see how we use Keycloakify in production.
If you still have problems, feel free to reach in the discussion area of the project.

Best regards.

A quick update here.
Keycloakify now has a documentation website.

1 Like