@iblai/web-utils 1.2.3 → 1.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.esm.js +16 -10
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +16 -10
- package/dist/index.js.map +1 -1
- package/dist/package.json +1 -1
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -3354,24 +3354,30 @@ function TenantProvider({ children, fallback, onAuthSuccess, onAuthFailure, curr
|
|
|
3354
3354
|
return;
|
|
3355
3355
|
}
|
|
3356
3356
|
let joined = false;
|
|
3357
|
+
joined = await joinAndActivateTenant(customDomainPlatformKey, {
|
|
3358
|
+
platform_key: customDomainPlatformKey,
|
|
3359
|
+
platform_name: customDomainPlatformKey,
|
|
3360
|
+
}, {
|
|
3361
|
+
key: customDomainPlatformKey,
|
|
3362
|
+
is_admin: false,
|
|
3363
|
+
org: customDomainPlatformKey,
|
|
3364
|
+
platform_name: customDomainPlatformKey,
|
|
3365
|
+
}, { handleVisitingTenant: false });
|
|
3357
3366
|
if (isWeb()) {
|
|
3358
|
-
joined = await joinAndActivateTenant(customDomainPlatformKey, {
|
|
3359
|
-
platform_key: customDomainPlatformKey,
|
|
3360
|
-
platform_name: customDomainPlatformKey,
|
|
3361
|
-
}, {
|
|
3362
|
-
key: customDomainPlatformKey,
|
|
3363
|
-
is_admin: false,
|
|
3364
|
-
org: customDomainPlatformKey,
|
|
3365
|
-
platform_name: customDomainPlatformKey,
|
|
3366
|
-
}, { handleVisitingTenant: false });
|
|
3367
3367
|
if (!joined) {
|
|
3368
3368
|
sessionStorage.setItem(guardKey, "1");
|
|
3369
3369
|
}
|
|
3370
|
+
else {
|
|
3371
|
+
const { data: tenants } = await fetchUserTenants();
|
|
3372
|
+
console.log("[determineWhichTenantToUse] tenants after joining are ", tenants);
|
|
3373
|
+
// Enhance tenants with platform metadata
|
|
3374
|
+
enhancedTenants = await enhanceTenants(tenants);
|
|
3375
|
+
}
|
|
3370
3376
|
}
|
|
3371
3377
|
if (!joined) {
|
|
3372
3378
|
redirectToAuthSpa === null || redirectToAuthSpa === void 0 ? void 0 : redirectToAuthSpa(undefined, undefined, true);
|
|
3379
|
+
return;
|
|
3373
3380
|
}
|
|
3374
|
-
return;
|
|
3375
3381
|
}
|
|
3376
3382
|
}
|
|
3377
3383
|
saveUserTenants(enhancedTenants);
|