@frontegg/js 7.100.0 → 7.101.0-alpha.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/index.js +1 -1
- package/node/index.js +1 -1
- package/node/version.js +1 -1
- package/package.json +2 -2
- package/umd/frontegg.development.js +28 -8
- package/umd/frontegg.production.min.js +1 -1
- package/umd/frontegg.production.min.js.LICENSE.txt +1 -1
- package/version.js +1 -1
package/index.js
CHANGED
package/node/index.js
CHANGED
package/node/version.js
CHANGED
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@frontegg/js",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.101.0-alpha.0",
|
|
4
4
|
"main": "./node/index.js",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Frontegg LTD",
|
|
7
7
|
"dependencies": {
|
|
8
8
|
"@babel/runtime": "^7.18.6",
|
|
9
|
-
"@frontegg/types": "7.
|
|
9
|
+
"@frontegg/types": "7.101.0-alpha.0"
|
|
10
10
|
},
|
|
11
11
|
"browserslist": {
|
|
12
12
|
"production": [
|
|
@@ -1881,7 +1881,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1881
1881
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
1882
1882
|
/* harmony export */ });
|
|
1883
1883
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
|
|
1884
|
-
cdnVersion: '7.
|
|
1884
|
+
cdnVersion: '7.101.0-alpha.0'
|
|
1885
1885
|
});
|
|
1886
1886
|
|
|
1887
1887
|
/***/ }),
|
|
@@ -19853,7 +19853,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
19853
19853
|
/* harmony import */ var _subscriptions_interfaces__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./subscriptions/interfaces */ "../../dist/@frontegg/redux-store/subscriptions/interfaces.js");
|
|
19854
19854
|
/* harmony import */ var _vendor__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./vendor */ "../../dist/@frontegg/redux-store/vendor/index.js");
|
|
19855
19855
|
/* harmony import */ var _audits__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./audits */ "../../dist/@frontegg/redux-store/audits/index.js");
|
|
19856
|
-
/** @license Frontegg v7.
|
|
19856
|
+
/** @license Frontegg v7.101.0-alpha.0
|
|
19857
19857
|
*
|
|
19858
19858
|
* This source code is licensed under the MIT license found in the
|
|
19859
19859
|
* LICENSE file in the root directory of this source tree.
|
|
@@ -28185,14 +28185,24 @@ class AuthenticationApi extends _BaseApiClient__WEBPACK_IMPORTED_MODULE_6__.Base
|
|
|
28185
28185
|
const [me, currentUserTenants] = await Promise.all([this.getMeAndEntitlements(), (0,_utils__WEBPACK_IMPORTED_MODULE_5__.getCurrentUserTenantsFunction)(this.appName)()]);
|
|
28186
28186
|
const decodedContent = accessToken ? (0,_jwt__WEBPACK_IMPORTED_MODULE_10__.jwtDecode)(accessToken) : {};
|
|
28187
28187
|
const user = (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__["default"])({}, loginResponse, decodedContent, me);
|
|
28188
|
-
|
|
28188
|
+
let {
|
|
28189
|
+
activeTenant
|
|
28190
|
+
} = currentUserTenants;
|
|
28191
|
+
if (contextHolder.isSessionPerTenantEnabled() && decodedContent.tenantId) {
|
|
28192
|
+
user.tenantId = decodedContent.tenantId;
|
|
28189
28193
|
(0,_utils__WEBPACK_IMPORTED_MODULE_5__.setTabTenantInSessionStorage)(user.tenantId);
|
|
28194
|
+
// The server's activeTenant may reflect a different tab's tenant switch.
|
|
28195
|
+
// Correct it to match the JWT's tenant for this tab.
|
|
28196
|
+
const matchingTenant = currentUserTenants.tenants.find(t => t.tenantId === decodedContent.tenantId);
|
|
28197
|
+
if (matchingTenant) {
|
|
28198
|
+
activeTenant = matchingTenant;
|
|
28199
|
+
}
|
|
28190
28200
|
}
|
|
28191
28201
|
contextHolder.setUser(user);
|
|
28192
28202
|
return {
|
|
28193
28203
|
user,
|
|
28194
28204
|
tenants: currentUserTenants.tenants,
|
|
28195
|
-
activeTenant
|
|
28205
|
+
activeTenant
|
|
28196
28206
|
};
|
|
28197
28207
|
};
|
|
28198
28208
|
this.generateLoginResponseFromOAuthResponse = async oauthResponse => {
|
|
@@ -28222,14 +28232,24 @@ class AuthenticationApi extends _BaseApiClient__WEBPACK_IMPORTED_MODULE_6__.Base
|
|
|
28222
28232
|
}, decodedContent, me, {
|
|
28223
28233
|
expiresIn: oauthResponse.expires_in || 300
|
|
28224
28234
|
});
|
|
28225
|
-
|
|
28235
|
+
let {
|
|
28236
|
+
activeTenant
|
|
28237
|
+
} = currentUserTenants;
|
|
28238
|
+
if (contextHolder.isSessionPerTenantEnabled() && decodedContent.tenantId) {
|
|
28239
|
+
user.tenantId = decodedContent.tenantId;
|
|
28226
28240
|
(0,_utils__WEBPACK_IMPORTED_MODULE_5__.setTabTenantInSessionStorage)(user.tenantId);
|
|
28241
|
+
// The server's activeTenant may reflect a different tab's tenant switch.
|
|
28242
|
+
// Correct it to match the JWT's tenant for this tab.
|
|
28243
|
+
const matchingTenant = currentUserTenants.tenants.find(t => t.tenantId === decodedContent.tenantId);
|
|
28244
|
+
if (matchingTenant) {
|
|
28245
|
+
activeTenant = matchingTenant;
|
|
28246
|
+
}
|
|
28227
28247
|
}
|
|
28228
28248
|
contextHolder.setUser(user);
|
|
28229
28249
|
return {
|
|
28230
28250
|
user,
|
|
28231
28251
|
tenants: currentUserTenants.tenants,
|
|
28232
|
-
activeTenant
|
|
28252
|
+
activeTenant
|
|
28233
28253
|
};
|
|
28234
28254
|
};
|
|
28235
28255
|
this.preLogin = async body => {
|
|
@@ -30180,7 +30200,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
30180
30200
|
/* harmony import */ var _security_center_interfaces__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./security-center/interfaces */ "../../dist/@frontegg/rest-api/security-center/interfaces.js");
|
|
30181
30201
|
/* harmony import */ var _applications_interfaces__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./applications/interfaces */ "../../dist/@frontegg/rest-api/applications/interfaces.js");
|
|
30182
30202
|
/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./constants */ "../../dist/@frontegg/rest-api/constants.js");
|
|
30183
|
-
/** @license Frontegg v7.
|
|
30203
|
+
/** @license Frontegg v7.101.0-alpha.0
|
|
30184
30204
|
*
|
|
30185
30205
|
* This source code is licensed under the MIT license found in the
|
|
30186
30206
|
* LICENSE file in the root directory of this source tree.
|
|
@@ -32975,7 +32995,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
32975
32995
|
/* harmony export */ });
|
|
32976
32996
|
/* harmony import */ var _ThemeOptions__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ThemeOptions */ "../../dist/@frontegg/types/ThemeOptions/index.js");
|
|
32977
32997
|
/* harmony import */ var _Metadata__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Metadata */ "../../dist/@frontegg/types/Metadata/index.js");
|
|
32978
|
-
/** @license Frontegg v7.
|
|
32998
|
+
/** @license Frontegg v7.101.0-alpha.0
|
|
32979
32999
|
*
|
|
32980
33000
|
* This source code is licensed under the MIT license found in the
|
|
32981
33001
|
* LICENSE file in the root directory of this source tree.
|