@iblai/web-utils 1.2.1 → 1.2.3
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 +9 -6
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +9 -6
- package/dist/index.js.map +1 -1
- package/dist/package.json +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3370,7 +3370,12 @@ function TenantProvider({ children, fallback, onAuthSuccess, onAuthFailure, curr
|
|
|
3370
3370
|
if (isWeb() && sessionStorage.getItem(guardKey)) {
|
|
3371
3371
|
sessionStorage.removeItem(guardKey);
|
|
3372
3372
|
console.warn(`[TenantProvider] User still does not belong to custom domain tenant after re-auth: ${customDomainPlatformKey}`);
|
|
3373
|
-
|
|
3373
|
+
onAuthFailure === null || onAuthFailure === void 0 ? void 0 : onAuthFailure(`You do not have access to this platform (${customDomainPlatformKey}). Please contact your administrator.`);
|
|
3374
|
+
return;
|
|
3375
|
+
}
|
|
3376
|
+
let joined = false;
|
|
3377
|
+
if (isWeb()) {
|
|
3378
|
+
joined = await joinAndActivateTenant(customDomainPlatformKey, {
|
|
3374
3379
|
platform_key: customDomainPlatformKey,
|
|
3375
3380
|
platform_name: customDomainPlatformKey,
|
|
3376
3381
|
}, {
|
|
@@ -3380,14 +3385,12 @@ function TenantProvider({ children, fallback, onAuthSuccess, onAuthFailure, curr
|
|
|
3380
3385
|
platform_name: customDomainPlatformKey,
|
|
3381
3386
|
}, { handleVisitingTenant: false });
|
|
3382
3387
|
if (!joined) {
|
|
3383
|
-
|
|
3388
|
+
sessionStorage.setItem(guardKey, "1");
|
|
3384
3389
|
}
|
|
3385
|
-
return;
|
|
3386
3390
|
}
|
|
3387
|
-
if (
|
|
3388
|
-
|
|
3391
|
+
if (!joined) {
|
|
3392
|
+
redirectToAuthSpa === null || redirectToAuthSpa === void 0 ? void 0 : redirectToAuthSpa(undefined, undefined, true);
|
|
3389
3393
|
}
|
|
3390
|
-
redirectToAuthSpa === null || redirectToAuthSpa === void 0 ? void 0 : redirectToAuthSpa(undefined, undefined, true);
|
|
3391
3394
|
return;
|
|
3392
3395
|
}
|
|
3393
3396
|
}
|