From 5b21a3bfce387963615d2ee7091ca2e2c600ba02 Mon Sep 17 00:00:00 2001 From: idittrich-valueon Date: Mon, 16 Jun 2025 10:20:49 +0200 Subject: [PATCH] updated base url again --- .github/workflows/int_poweron-nyla-int.yml | 10 ++++++++++ src/hooks/useAuthentication.ts | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/int_poweron-nyla-int.yml b/.github/workflows/int_poweron-nyla-int.yml index 93f6eea..36a503d 100644 --- a/.github/workflows/int_poweron-nyla-int.yml +++ b/.github/workflows/int_poweron-nyla-int.yml @@ -18,6 +18,16 @@ jobs: node-version: '18' cache: 'npm' + - name: Create production environment file + run: | + echo 'VITE_API_BASE_URL="https://gateway-int.poweron-center.net"' > .env.production + echo 'VITE_MICROSOFT_CLIENT_ID="24cd6c8a-b592-4905-a5ba-d5fa9f911154"' >> .env.production + echo 'VITE_MICROSOFT_TENANT_ID="6a51aaeb-2467-4186-9504-2a05aedc591f"' >> .env.production + echo 'VITE_ENTRA_CLIENT_SECRET="2iw8Q~jwqG1iacxHopBt5pstu6R45UC1gIQabcbD"' >> .env.production + echo 'VITE_ENTRA_AUTHORITY="https://login.microsoftonline.com/6a51aaeb-2467-4186-9504-2a05aedc591f"' >> .env.production + echo 'VITE_ENTRA_REDIRECT_PATH="/auth/callback/"' >> .env.production + echo 'VITE_ENTRA_REDIRECT_URI="https://gateway-int.poweron-center.net/api/msft/auth/callback/"' >> .env.production + - name: npm install, build run: | npm ci diff --git a/src/hooks/useAuthentication.ts b/src/hooks/useAuthentication.ts index b0094a6..7882250 100644 --- a/src/hooks/useAuthentication.ts +++ b/src/hooks/useAuthentication.ts @@ -32,7 +32,7 @@ export function useAuth() { // Create a custom axios instance for this request const instance = axios.create({ - baseURL: 'https://gateway.poweron-center.net', + baseURL: import.meta.env.VITE_API_BASE_URL, withCredentials: true, headers: { 'Content-Type': 'application/x-www-form-urlencoded'