@iblai/web-utils 1.2.2 → 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.d.ts +1 -1
- 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.d.ts
CHANGED
|
@@ -811,7 +811,7 @@ declare const isWeb: () => boolean;
|
|
|
811
811
|
declare const isNode: () => string | false;
|
|
812
812
|
declare const isExpo: () => any;
|
|
813
813
|
declare const isTauri: () => boolean;
|
|
814
|
-
declare const getPlatform: () => "
|
|
814
|
+
declare const getPlatform: () => "web" | "react-native" | "node" | "unknown";
|
|
815
815
|
declare const safeRequire: (moduleName: string) => any;
|
|
816
816
|
declare const getNextNavigation: () => any;
|
|
817
817
|
|
package/dist/index.esm.js
CHANGED
|
@@ -3350,7 +3350,12 @@ function TenantProvider({ children, fallback, onAuthSuccess, onAuthFailure, curr
|
|
|
3350
3350
|
if (isWeb() && sessionStorage.getItem(guardKey)) {
|
|
3351
3351
|
sessionStorage.removeItem(guardKey);
|
|
3352
3352
|
console.warn(`[TenantProvider] User still does not belong to custom domain tenant after re-auth: ${customDomainPlatformKey}`);
|
|
3353
|
-
|
|
3353
|
+
onAuthFailure === null || onAuthFailure === void 0 ? void 0 : onAuthFailure(`You do not have access to this platform (${customDomainPlatformKey}). Please contact your administrator.`);
|
|
3354
|
+
return;
|
|
3355
|
+
}
|
|
3356
|
+
let joined = false;
|
|
3357
|
+
if (isWeb()) {
|
|
3358
|
+
joined = await joinAndActivateTenant(customDomainPlatformKey, {
|
|
3354
3359
|
platform_key: customDomainPlatformKey,
|
|
3355
3360
|
platform_name: customDomainPlatformKey,
|
|
3356
3361
|
}, {
|
|
@@ -3360,14 +3365,12 @@ function TenantProvider({ children, fallback, onAuthSuccess, onAuthFailure, curr
|
|
|
3360
3365
|
platform_name: customDomainPlatformKey,
|
|
3361
3366
|
}, { handleVisitingTenant: false });
|
|
3362
3367
|
if (!joined) {
|
|
3363
|
-
|
|
3368
|
+
sessionStorage.setItem(guardKey, "1");
|
|
3364
3369
|
}
|
|
3365
|
-
return;
|
|
3366
3370
|
}
|
|
3367
|
-
if (
|
|
3368
|
-
|
|
3371
|
+
if (!joined) {
|
|
3372
|
+
redirectToAuthSpa === null || redirectToAuthSpa === void 0 ? void 0 : redirectToAuthSpa(undefined, undefined, true);
|
|
3369
3373
|
}
|
|
3370
|
-
redirectToAuthSpa === null || redirectToAuthSpa === void 0 ? void 0 : redirectToAuthSpa(undefined, undefined, true);
|
|
3371
3374
|
return;
|
|
3372
3375
|
}
|
|
3373
3376
|
}
|