diff --git a/compose.yml b/compose.yml index e9942c0..a002249 100644 --- a/compose.yml +++ b/compose.yml @@ -37,6 +37,7 @@ services: args: - OIDC_ISSUER_URI=${OIDC_ISSUER_URI:-http://localhost:8090/realms/voidAuth} - OIDC_CLIENT_ID=${OIDC_CLIENT_ID:-lmnp-client} + - OIDC_CLIENT_SECRET=${OIDC_CLIENT_SECRET:-lmnp-secret} container_name: lmnp-frontend ports: - "80:80" diff --git a/frontend/Dockerfile b/frontend/Dockerfile index 5533a9c..d85dcf0 100644 --- a/frontend/Dockerfile +++ b/frontend/Dockerfile @@ -14,10 +14,12 @@ COPY . . # Accept build arguments for environment variables ARG OIDC_ISSUER_URI ARG OIDC_CLIENT_ID +ARG OIDC_CLIENT_SECRET # Set build-time environment variables for @ngx-env/builder ENV OIDC_ISSUER_URI=$OIDC_ISSUER_URI ENV OIDC_CLIENT_ID=$OIDC_CLIENT_ID +ENV OIDC_CLIENT_SECRET=$OIDC_CLIENT_SECRET ENV CI=true ENV NG_CLI_ANALYTICS=false diff --git a/frontend/src/app/app.config.ts b/frontend/src/app/app.config.ts index 2fb43af..4e3c92c 100644 --- a/frontend/src/app/app.config.ts +++ b/frontend/src/app/app.config.ts @@ -20,6 +20,7 @@ export const appConfig: ApplicationConfig = { issuer: configService.oidcIssuer, redirectUri: window.location.origin + '/', clientId: configService.clientId, + dummyClientSecret: configService.clientSecret, responseType: 'code', scope: 'openid profile email', showDebugInformation: true, diff --git a/frontend/src/app/config.service.ts b/frontend/src/app/config.service.ts index 4a0488f..9d5172c 100644 --- a/frontend/src/app/config.service.ts +++ b/frontend/src/app/config.service.ts @@ -15,4 +15,8 @@ export class ConfigService { get clientId(): string { return import.meta.env['OIDC_CLIENT_ID'] || 'lmnp-client'; } + + get clientSecret(): string { + return import.meta.env['OIDC_CLIENT_SECRET'] || 'lmnp-secret'; + } }