From df6d56bf78118835c2852cfad18ae483f9d0c5e6 Mon Sep 17 00:00:00 2001 From: Giulio <3272563+giuliohome@users.noreply.github.com> Date: Mon, 9 Oct 2023 20:07:17 +0200 Subject: [PATCH] api audience --- .github/workflows/main_sqltodo.yml | 2 ++ src/web/src/App.tsx | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main_sqltodo.yml b/.github/workflows/main_sqltodo.yml index 7dd68eea..5b7b402e 100644 --- a/.github/workflows/main_sqltodo.yml +++ b/.github/workflows/main_sqltodo.yml @@ -30,6 +30,8 @@ jobs: npm install echo "check react env var" echo "$REACT_APP_AUTH0_DOMAIN" + echo "check api audience" + echo "$REACT_APP_AUTH0_DOMAIN" npm run build --if-present - name: Upload artifact for deployment job diff --git a/src/web/src/App.tsx b/src/web/src/App.tsx index 513d17fb..ebdf1838 100644 --- a/src/web/src/App.tsx +++ b/src/web/src/App.tsx @@ -16,6 +16,7 @@ export const App: FC = () => { const initialContext: AppContext = { state: applicationState, dispatch: dispatch } const domain = process.env.REACT_APP_AUTH0_DOMAIN??""; const clientId = process.env.REACT_APP_AUTH0_CLIENT_ID??""; + const api_audience = process.env.REACT_APP_AUTH0_AUDIENCE ?? ""; initializeIcons(); @@ -24,7 +25,8 @@ export const App: FC = () => { domain={domain} clientId={clientId} authorizationParams={{ - redirect_uri: window.location.origin + redirect_uri: window.location.origin, + audience: api_audience }} >