Skip to content

Commit

Permalink
Update template to use env variables for the config (#24)
Browse files Browse the repository at this point in the history
Co-authored-by: Andrey Rusakov <[email protected]>
  • Loading branch information
lanseg and Andrey Rusakov authored Oct 14, 2024
1 parent 56366a3 commit d1eb2d6
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
9 changes: 9 additions & 0 deletions .env.sample
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,12 @@ ROOTURL=/geoshop_api
# where are metadata and product images? This is concatenated with relative paths coming from backend
# MEDIA_URL=https://some.server.com/geoshop_media
MEDIA_URL=
# Link to the OIDC provider root url. That is a path where all the auth links live, for example,
# https://some.oidc_provider.com/.well-known/openid-configuration
OIDC_OP_BASE_URL=
# Externally-visible geoshop frontend root, oidc provider will redirect here after the authentication
# For example, https://geoshop.server.com (and the redirect links will be
# https://geoshop.server.com/auth/oidc and https://geoshop.server.com/signedout
REDIRECT_BASE_URL=
# Geoshop-frontend ID at the OIDC provider
OIDC_RP_CLIENT_ID=
8 changes: 4 additions & 4 deletions src/assets/configs/config.json.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,10 @@
}
]
"oidcConfig": {
"authority": "PLEASE_CONFIGURE_OIDC_URL",
"redirectUrl": "http://localhost:4200/auth/oidc",
"postLogoutRedirectUri": "http://localhost:4200/signedout",
"clientId": "PLEASE_CONFIGURE_CLIENT_ID",
"authority": "${OIDC_OP_BASE_URL}",
"redirectUrl": "${FRONTEND_BASE_URL}/auth/oidc",
"postLogoutRedirectUri": "${FRONTEND_BASE_URL}/signedout",
"clientId": "${OIDC_RP_CLIENT_ID}",
"scope": "openid profile email address phone",
"responseType": "code",
"silentRenew": true,
Expand Down

0 comments on commit d1eb2d6

Please sign in to comment.