feat: add OIDC_CLIENT_SECRET configuration to frontend environment and OIDC provider settings
This commit is contained in:
1 parent
53d0c886a6
commit
fce17a1c31
4 files changed
+8
No files matched your search
@@ -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"
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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';
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user