-
Notifications
You must be signed in to change notification settings - Fork 0
Keycloak Local Setup
GeronimoLeLanToussaintJalaUniversity edited this page May 31, 2026
·
2 revisions
- Docker installed and running
- Realm export file:
realm-export.json(pedírselo a un miembro del equipo)
docker run -p 8080:8080 \
-e KC_BOOTSTRAP_ADMIN_USERNAME=admin \
-e KC_BOOTSTRAP_ADMIN_PASSWORD=admin \
-v $(pwd)/realm-export.json:/opt/keycloak/data/import/realm.json \
quay.io/keycloak/keycloak:26.2.5 start-dev --import-realmOn Windows (PowerShell) replace
$(pwd)with${PWD}.
Keycloak will be available at: http://localhost:8080
Admin console: http://localhost:8080/admin — credentials: admin / admin
The import includes: realm config, client (quiz-arena-ui), roles, default groups and seed users.
| Item | Value |
|---|---|
| Realm | master |
| Client ID | quiz-arena-ui |
| Client type | Public (no secret) |
| Auth flow | Authorization Code + PKCE (S256) |
| Redirect URI | http://localhost:4200/ |
| Post-logout redirect URI | http://localhost:4200/ |
| Roles |
student, teacher
|
| Default group |
Students → auto-assigns student role on registration |
| Registration | Enabled |
In src/environments/environment.ts update the issuer:
export const environment = {
production: false,
keycloak: {
issuer: 'http://localhost:8080/realms/master',
clientId: 'quiz-arena-ui',
},
};npm start- Go to
http://localhost:4200→ redirects to/login - Click Comenzar → redirects to Keycloak at
localhost:8080 - Log in with a seed user → lands on the main layout
- Click Sign out → redirects back to
/login