Compare commits

...

2 Commits

Author SHA1 Message Date
Grae Jones
a6e96bd61a home urls
All checks were successful
Client Home / build-deploy (push) Successful in 7s
2026-03-25 10:28:12 -07:00
Grae Jones
7925b45d76 Rewg Fix 2
All checks were successful
Client Tech / build-deploy (push) Successful in 11s
2026-03-23 14:10:25 -07:00
4 changed files with 17 additions and 31 deletions

File diff suppressed because one or more lines are too long

View File

@@ -4,7 +4,7 @@
// - APP_URL: the URL that should open the *app* (direct entry / dashboard).
// - REGISTRATION_URL: the URL to your external registration experience.
//
// Tip: keep these as full absolute URLs.
// Tip: keep these as full absolute
export const APP_URL = 'https://adpclient.usimdev.com/';
export const REGISTRATION_URL = 'https://adpregist.usimdev.com/';
export const APP_URL = 'https://client.positivespend.com/';
export const REGISTRATION_URL = 'https://register.positivespend.com/';

File diff suppressed because one or more lines are too long

View File

@@ -1,30 +1,17 @@
/**
* authConfig.js — Tech Client (Staff Plane)
*
* ┌─────────────────────────────────────────────────────────────────────────┐
* │ PRODUCTION MIGRATION — only these values change at handoff: │
* │ │
* │ STAFF_AUTHORITY → 'https://login.microsoftonline.com/{ORG_TENANT}' │
* │ STAFF_TENANT_ID → new company org tenant ID │
* │ STAFF_CLIENT_ID → staff app registration in org tenant │
* │ │
* │ No other code changes required anywhere. │
* └─────────────────────────────────────────────────────────────────────────┘
*
* DEV NOTE: Staff currently authenticate against the CIAM tenant (same as
* clients) because no org tenant exists yet. The login screen looks identical
* to the client login — this is cosmetic only. API isolation is enforced by
* audience: staff tokens are rejected by Gateway, client tokens by Management.
*/
// ── Staff Identity Config ─────────────────────────────────────────────────────
const STAFF_TENANT_ID = 'f56a3c51-9b5c-4356-920f-b4dcf932a96b';
const STAFF_CLIENT_ID = '217928a9-4591-4dff-9f09-5b233824cf4f';
const STAFF_TENANT_ID = 'f56a3c51-9b5c-4356-920f-b4dcf932a96b';
const STAFF_CLIENT_ID = '217928a9-4591-4dff-9f09-5b233824cf4f';
// PROD: swap to → 'https://login.microsoftonline.com/' + STAFF_TENANT_ID
const STAFF_AUTHORITY = 'https://login.microsoftonline.com/' + STAFF_TENANT_ID;
// Management Staff API — resource the Tech SPA requests a token for
const MGMT_APP_ID = 'af95fa13-2ef4-4911-b137-7acc6a784cfa';
// ── MSAL Config ───────────────────────────────────────────────────────────────
export const msalConfig = {
@@ -33,10 +20,10 @@ export const msalConfig = {
authority: STAFF_AUTHORITY,
redirectUri: window.location.origin,
postLogoutRedirectUri: window.location.origin,
navigateToLoginRequestUrl: true,
navigateToLoginRequestUrl: false, // ← was true, caused the loop
},
cache: {
cacheLocation: 'sessionStorage',
cacheLocation: 'sessionStorage',
storeAuthStateInCookie: false,
},
system: {
@@ -50,19 +37,18 @@ export const msalConfig = {
case 3: console.debug(message); break;
}
},
logLevel: 3,
logLevel: 1, // warn + error only in prod
},
},
};
export const loginRequest = {
scopes: ["api://4e4d69c3-558a-4a27-a689-17bd397175e5/access_as_user"]
scopes: [`api://${MGMT_APP_ID}/access_as_user`] // ← fixed
};
// ── API Endpoints ─────────────────────────────────────────────────────────────
export const API_BASE = 'https://adpapi.usimdev.com'; // Gateway API
export const MGMT_BASE = 'https://adpmgmt.usimdev.com'; // Management API
export const API_BASE = 'https://portal.positivespend.com'; // ← fixed
export const MGMT_BASE = 'https://mgmt.positivespend.com'; // ← fixed
// Legacy — kept for backward compatibility with apiClient.js
export const SESSION_ENDPOINT = `${API_BASE}/api/auth/session`;
export const SESSION_ENDPOINT = `${API_BASE}/api/auth/session`;