Files
AdPlatform-Client/Client-Client/src/auth/authConfig.js
Grae Jones fdb3e117a9
Some checks failed
Client Admin / build-deploy (push) Failing after 8s
Client Client / build-deploy (push) Failing after 3s
Client Registration / build-deploy (push) Failing after 20s
Client Tech / build-deploy (push) Failing after 1s
Client Home / build-deploy (push) Successful in 14s
First build
2026-03-21 17:54:42 -07:00

58 lines
1.8 KiB
JavaScript

// ─── Entra External ID (CIAM for third-party logins) ───
const TENANT_ID = '891f98f1-ed34-42a1-9b6c-28b0554d92c2';
const CLIENT_ID = '154c9111-14a0-4c0f-8132-7bc68254a74e';
const AUTHORITY = `https://USIMClients.ciamlogin.com/${TENANT_ID}`;
// ─── Gateway API ───
export const GATEWAY_URL = 'https://adpapi.usimdev.com';
// ─── Management API (used by HelpIcon for contextual help content) ───
export const MANAGEMENT_URL = 'https://adpmgmt.usimdev.com';
// ─── Session endpoint ───
export const SESSION_ENDPOINT = `${GATEWAY_URL}/api/auth/session`;
// ─── Registration portal ───
export const REGISTRATION_URL = 'https://adpregist.usimdev.com';
// ─── MSAL configuration ───
export const msalConfig = {
auth: {
clientId: CLIENT_ID,
authority: AUTHORITY,
redirectUri: window.location.origin,
postLogoutRedirectUri: window.location.origin,
knownAuthorities: ['USIMClients.ciamlogin.com'],
navigateToLoginRequestUrl: true
},
cache: {
cacheLocation: 'localStorage',
storeAuthStateInCookie: false
},
system: {
loggerOptions: {
loggerCallback: (level, message, containsPii) => {
if (containsPii) return;
switch (level) {
case 0: console.error(message); break;
case 1: console.warn(message); break;
case 2: console.info(message); break;
case 3: console.debug(message); break;
}
},
logLevel: 3
}
}
};
export const loginRequest = {
scopes: ['openid', 'profile', 'email']
};
// ─── Aliases for current Client components ───
export const API_BASE_URL = GATEWAY_URL;
export const GATEWAY_API_URL = GATEWAY_URL;
export const API_BASE = GATEWAY_URL;
export const MGMT_BASE = MANAGEMENT_URL;