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:
|
args:
|
||||||
- OIDC_ISSUER_URI=${OIDC_ISSUER_URI:-http://localhost:8090/realms/voidAuth}
|
- OIDC_ISSUER_URI=${OIDC_ISSUER_URI:-http://localhost:8090/realms/voidAuth}
|
||||||
- OIDC_CLIENT_ID=${OIDC_CLIENT_ID:-lmnp-client}
|
- OIDC_CLIENT_ID=${OIDC_CLIENT_ID:-lmnp-client}
|
||||||
|
- OIDC_CLIENT_SECRET=${OIDC_CLIENT_SECRET:-lmnp-secret}
|
||||||
container_name: lmnp-frontend
|
container_name: lmnp-frontend
|
||||||
ports:
|
ports:
|
||||||
- "80:80"
|
- "80:80"
|
||||||
|
|||||||
@@ -14,10 +14,12 @@ COPY . .
|
|||||||
# Accept build arguments for environment variables
|
# Accept build arguments for environment variables
|
||||||
ARG OIDC_ISSUER_URI
|
ARG OIDC_ISSUER_URI
|
||||||
ARG OIDC_CLIENT_ID
|
ARG OIDC_CLIENT_ID
|
||||||
|
ARG OIDC_CLIENT_SECRET
|
||||||
|
|
||||||
# Set build-time environment variables for @ngx-env/builder
|
# Set build-time environment variables for @ngx-env/builder
|
||||||
ENV OIDC_ISSUER_URI=$OIDC_ISSUER_URI
|
ENV OIDC_ISSUER_URI=$OIDC_ISSUER_URI
|
||||||
ENV OIDC_CLIENT_ID=$OIDC_CLIENT_ID
|
ENV OIDC_CLIENT_ID=$OIDC_CLIENT_ID
|
||||||
|
ENV OIDC_CLIENT_SECRET=$OIDC_CLIENT_SECRET
|
||||||
ENV CI=true
|
ENV CI=true
|
||||||
ENV NG_CLI_ANALYTICS=false
|
ENV NG_CLI_ANALYTICS=false
|
||||||
|
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ export const appConfig: ApplicationConfig = {
|
|||||||
issuer: configService.oidcIssuer,
|
issuer: configService.oidcIssuer,
|
||||||
redirectUri: window.location.origin + '/',
|
redirectUri: window.location.origin + '/',
|
||||||
clientId: configService.clientId,
|
clientId: configService.clientId,
|
||||||
|
dummyClientSecret: configService.clientSecret,
|
||||||
responseType: 'code',
|
responseType: 'code',
|
||||||
scope: 'openid profile email',
|
scope: 'openid profile email',
|
||||||
showDebugInformation: true,
|
showDebugInformation: true,
|
||||||
|
|||||||
@@ -15,4 +15,8 @@ export class ConfigService {
|
|||||||
get clientId(): string {
|
get clientId(): string {
|
||||||
return import.meta.env['OIDC_CLIENT_ID'] || 'lmnp-client';
|
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