From 04c68e74c7474189fc3fa82d097680d0deaa282d Mon Sep 17 00:00:00 2001 From: nati14575 Date: Thu, 27 Aug 2026 11:19:09 +0300 Subject: [PATCH] Update API URL fallback in UserManagementPage to ensure local development compatibility --- .../src/app/features/user-management/UserManagementPage.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/apps/backoffice/src/app/features/user-management/UserManagementPage.tsx b/apps/backoffice/src/app/features/user-management/UserManagementPage.tsx index 6a96bba84..a3e3d8f90 100644 --- a/apps/backoffice/src/app/features/user-management/UserManagementPage.tsx +++ b/apps/backoffice/src/app/features/user-management/UserManagementPage.tsx @@ -99,7 +99,11 @@ const UM_CONFIG: DesignConfig = { const UM_RUNTIME = { basename: '/um', - apiUrl: import.meta.env.VITE_BASE_API_URL, + // Keep the embedded IAM module on the same API as the backoffice client. + // When VITE_BASE_API_URL is absent locally, passing undefined makes iamui + // fall back to its remote development server, where the local JWT is + // rejected and the module redirects to its login page. + apiUrl: import.meta.env.VITE_BASE_API_URL ?? 'http://localhost:3000/api', }; const buttonStyle: React.CSSProperties = {