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 = {