This is an example of how to use AdminJS Express Keycloak.
- Node.js (latest)
- npm (latest)
- Keycloak client setup
Clone the repository:
git clone https://github.com/gugupy/adminjs-express-keycloak.gitInstall dependencies:
cd adminjs-express-keycloak
npm installUpdate the Keycloak client configuration in src/config.ts with your Keycloak server URL, realm, client ID, and client secret. Alternatively, set the following environment variables in a .env file:
| Variable | Description |
|---|---|
| KEYCLOAK_URL | Base URL of your Keycloak server (e.g. https://auth.example.com) |
| KEYCLOAK_REALM | Keycloak realm name |
| KEYCLOAK_CLIENT_ID | Client ID for the Keycloak client |
| KEYCLOAK_CLIENT_SECRET | Client secret for the Keycloak client (if required) |
| ADMINJS_REDIRECT_URI | Redirect URI used by AdminJS (callback URL) |
Start the application:
npm run build && npm start