@iblai/web-utils 1.9.1 → 1.10.0
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/auth/index.d.ts +1 -0
- package/dist/auth/index.esm.js +2 -2
- package/dist/auth/index.esm.js.map +1 -1
- package/dist/auth/index.js +2 -2
- package/dist/auth/index.js.map +1 -1
- package/dist/auth/web-utils/src/utils/auth.d.ts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.esm.js +2 -2
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/package.json +1 -1
- package/dist/web-utils/src/utils/auth.d.ts +1 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1195,7 +1195,7 @@ async function redirectToAuthSpa(options) {
|
|
|
1195
1195
|
logoutTimestamp: "ibl_logout_timestamp",
|
|
1196
1196
|
loginTimestamp: "ibl_login_timestamp",
|
|
1197
1197
|
tenantSwitching: "ibl_tenant_switching",
|
|
1198
|
-
}, hasNonExpiredAuthToken, isOffline, preserveTokenKey, authRedirectProxy, isNativeApp, forceRedirect = false, } = options;
|
|
1198
|
+
}, hasNonExpiredAuthToken, isOffline, preserveTokenKey, authRedirectProxy, isNativeApp, scheme = "iblai-mentor://", forceRedirect = false, } = options;
|
|
1199
1199
|
console.log("[redirectToAuthSpa] starting redirect to auth spa", redirectTo, platformKey, logout, saveRedirect, forceRedirect);
|
|
1200
1200
|
// Skip if a tenant switch is already in progress
|
|
1201
1201
|
if (!forceRedirect &&
|
|
@@ -1270,7 +1270,7 @@ async function redirectToAuthSpa(options) {
|
|
|
1270
1270
|
window.localStorage.setItem(redirectPathStorageKey, redirectPath);
|
|
1271
1271
|
}
|
|
1272
1272
|
const platform = platformKey !== null && platformKey !== void 0 ? platformKey : getPlatformKey(redirectPath);
|
|
1273
|
-
const redirectToUrl = `${window.location.origin}`;
|
|
1273
|
+
const redirectToUrl = (isNativeApp === null || isNativeApp === void 0 ? void 0 : isNativeApp()) ? scheme : `${window.location.origin}`;
|
|
1274
1274
|
let authRedirectUrl = `${authUrl}/login?${queryParams.app}=${appName}`;
|
|
1275
1275
|
authRedirectUrl += `&${queryParams.redirectTo}=${redirectToUrl}`;
|
|
1276
1276
|
if (platform) {
|