Skip to content

Commit d4503f0

Browse files
authored
ci: set auth0 client IDs for stage/prod in deployment workflows (#38)
Set auth0 client IDs for stage/prod in deployment workflows
1 parent d60a012 commit d4503f0

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

.github/workflows/azure-static-web-apps-brave-ocean-076b69903.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ jobs:
3333
output_location: "build" # Built app content directory - optional
3434
skip_deploy_on_missing_secrets: true # dependabot related
3535
###### End of Repository/Build Configurations ######
36+
env:
37+
VITE_AUTH0_CLIENT_ID: Hku0EniRjy4B2krnx1sCwTIOzAiVta1B
3638

3739
close_pull_request_job:
3840
if: github.event_name == 'pull_request' && github.event.action == 'closed'

.github/workflows/azure-static-web-apps-icy-stone-001be1b03.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,5 @@ jobs:
2727
api_location: "build/server" # Api source code path - optional
2828
output_location: "build" # Built app content directory - optional
2929
###### End of Repository/Build Configurations ######
30+
env:
31+
VITE_AUTH0_CLIENT_ID: VSkXGqlTD7Rf5Q4n9a0h00rInEyL2ZQj

src/auth/auth_config.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1+
const isDev = import.meta.env.DEV || window.location.hostname === "localhost";
2+
13
const config = {
24
domain: "auth.hochfrequenz.de",
3-
clientId: "Hku0EniRjy4B2krnx1sCwTIOzAiVta1B", // shared "HF-stage-apps" auth0 client ID
5+
clientId: isDev ? "" : import.meta.env.VITE_AUTH0_CLIENT_ID || "", // shared "HF-apps-stage/prod" tenant auth0 client IDs
46
};
57

68
export default config as {

0 commit comments

Comments
 (0)