Skip to content

Commit

Permalink
🔧 fix: add env var for keycloak realm (#162)
Browse files Browse the repository at this point in the history
🔧 fix: add env var for keycloak realm
----------
Co-authored-by: feraudt <[email protected]>
  • Loading branch information
feraudt authored Dec 13, 2024
1 parent d51c275 commit 613a555
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ services:
- DATABASE_URL=postgresql://postgres:password@postgres:5432/postgres
- ALLOWED_ORIGINS=http://localhost:5173,http://localhost:8080,http://krakend:8080
- KEYCLOAK_BASE_URL=http://localhost:8082
- KEYCLOAK_REALM=referentiel-applications
# To be deleted
- KEYCLOAK_CLIENT_SECRET="client secret"
depends_on:
Expand Down
4 changes: 2 additions & 2 deletions server/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ async function bootstrap() {
description: 'OAuth2 authentication using Keycloak',
flows: {
authorizationCode: {
authorizationUrl: `${process.env.KEYCLOAK_BASE_URL}/realms/referentiel-applications/protocol/openid-connect/auth`,
tokenUrl: `${process.env.KEYCLOAK_BASE_URL}/realms/referentiel-applications/protocol/openid-connect/token`,
authorizationUrl: `${process.env.KEYCLOAK_BASE_URL}/realms/${process.env.KEYCLOAK_REALM}/protocol/openid-connect/auth`,
tokenUrl: `${process.env.KEYCLOAK_BASE_URL}/realms/${process.env.KEYCLOAK_REALM}/protocol/openid-connect/token`,
scopes: {
openid: 'OpenID scope',
profile: 'Profile scope',
Expand Down

0 comments on commit 613a555

Please sign in to comment.