@frontegg/js 7.37.0 → 7.38.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/FronteggApp/FronteggApp.d.ts +1 -0
- package/FronteggApp/FronteggApp.js +8 -1
- package/index.js +1 -1
- package/node/FronteggApp/FronteggApp.js +7 -0
- package/node/index.js +1 -1
- package/node/version.js +1 -1
- package/package.json +2 -2
- package/umd/frontegg.development.js +81 -43
- package/umd/frontegg.production.min.js +1 -1
- package/umd/frontegg.production.min.js.LICENSE.txt +1 -1
- package/version.js +1 -1
|
@@ -4,7 +4,7 @@ import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
|
|
4
4
|
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
|
5
5
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
6
6
|
import * as FronteggReduxStore from '@frontegg/redux-store';
|
|
7
|
-
import { createStore, getFeatureEntitlements as _getFeatureEntitlements, getPermissionEntitlements as _getPermissionEntitlements, isSteppedUp as _isSteppedUp, redirectByStepUpUrl,
|
|
7
|
+
import { createStore, DEFAULT_RETRY_CONFIG, errorTraceId, getFeatureEntitlements as _getFeatureEntitlements, getPermissionEntitlements as _getPermissionEntitlements, isSteppedUp as _isSteppedUp, redirectByStepUpUrl, REQUEST_NAME, retryIfNeeded } from '@frontegg/redux-store';
|
|
8
8
|
import * as FronteggTypes from '@frontegg/types';
|
|
9
9
|
import { Metadata } from '@frontegg/types';
|
|
10
10
|
import { formatName, restoreSearchParams } from '../utils';
|
|
@@ -27,6 +27,7 @@ export var FronteggApp = /*#__PURE__*/function () {
|
|
|
27
27
|
this.options = void 0;
|
|
28
28
|
this.loading = true;
|
|
29
29
|
this.cdnUrl = "https://assets.frontegg.com/admin-box/".concat(versions.cdnVersion);
|
|
30
|
+
this.assetsUrl = "https://adminBox.frontegg.com/admin-box/".concat(versions.cdnVersion);
|
|
30
31
|
this.customElementName = '';
|
|
31
32
|
this.adminPortalEl = void 0;
|
|
32
33
|
this.adminPortalRenderer = void 0;
|
|
@@ -198,6 +199,11 @@ export var FronteggApp = /*#__PURE__*/function () {
|
|
|
198
199
|
if (this.options.cdnUrl) {
|
|
199
200
|
this.cdnUrl = this.options.cdnUrl;
|
|
200
201
|
}
|
|
202
|
+
if (this.options.assetsUrl) {
|
|
203
|
+
this.assetsUrl = this.options.assetsUrl;
|
|
204
|
+
}
|
|
205
|
+
ContextHolder["for"](this.name).setCdnUrl(this.cdnUrl);
|
|
206
|
+
ContextHolder["for"](this.name).setAssetsUrl(this.assetsUrl);
|
|
201
207
|
this.customElementName = customElementName;
|
|
202
208
|
var authOptions = this.options.authOptions ? Object.assign({}, this.options.authOptions, {
|
|
203
209
|
hostedLoginBox: this.options.hostedLoginBox
|
|
@@ -258,6 +264,7 @@ export var FronteggApp = /*#__PURE__*/function () {
|
|
|
258
264
|
}, {
|
|
259
265
|
key: "dispatchErrorByRequestName",
|
|
260
266
|
value: function dispatchErrorByRequestName(error, requestName) {
|
|
267
|
+
if ((error == null ? void 0 : error.statusCode) < 500) return;
|
|
261
268
|
this.store.dispatch({
|
|
262
269
|
type: 'auth/setErrorByRequestName',
|
|
263
270
|
payload: {
|
package/index.js
CHANGED
|
@@ -34,6 +34,7 @@ var FronteggApp = /*#__PURE__*/function () {
|
|
|
34
34
|
this.options = void 0;
|
|
35
35
|
this.loading = true;
|
|
36
36
|
this.cdnUrl = "https://assets.frontegg.com/admin-box/".concat(_version["default"].cdnVersion);
|
|
37
|
+
this.assetsUrl = "https://adminBox.frontegg.com/admin-box/".concat(_version["default"].cdnVersion);
|
|
37
38
|
this.customElementName = '';
|
|
38
39
|
this.adminPortalEl = void 0;
|
|
39
40
|
this.adminPortalRenderer = void 0;
|
|
@@ -205,6 +206,11 @@ var FronteggApp = /*#__PURE__*/function () {
|
|
|
205
206
|
if (this.options.cdnUrl) {
|
|
206
207
|
this.cdnUrl = this.options.cdnUrl;
|
|
207
208
|
}
|
|
209
|
+
if (this.options.assetsUrl) {
|
|
210
|
+
this.assetsUrl = this.options.assetsUrl;
|
|
211
|
+
}
|
|
212
|
+
FronteggRestApi.ContextHolder["for"](this.name).setCdnUrl(this.cdnUrl);
|
|
213
|
+
FronteggRestApi.ContextHolder["for"](this.name).setAssetsUrl(this.assetsUrl);
|
|
208
214
|
this.customElementName = customElementName;
|
|
209
215
|
var authOptions = this.options.authOptions ? Object.assign({}, this.options.authOptions, {
|
|
210
216
|
hostedLoginBox: this.options.hostedLoginBox
|
|
@@ -265,6 +271,7 @@ var FronteggApp = /*#__PURE__*/function () {
|
|
|
265
271
|
}, {
|
|
266
272
|
key: "dispatchErrorByRequestName",
|
|
267
273
|
value: function dispatchErrorByRequestName(error, requestName) {
|
|
274
|
+
if ((error == null ? void 0 : error.statusCode) < 500) return;
|
|
268
275
|
this.store.dispatch({
|
|
269
276
|
type: 'auth/setErrorByRequestName',
|
|
270
277
|
payload: {
|
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.38.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.38.0-alpha.0"
|
|
10
10
|
},
|
|
11
11
|
"browserslist": {
|
|
12
12
|
"production": [
|
|
@@ -324,7 +324,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
324
324
|
/* harmony import */ var _frontegg_redux_store__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @frontegg/redux-store */ "../../dist/@frontegg/redux-store/helpers/common.js");
|
|
325
325
|
/* harmony import */ var _frontegg_redux_store__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @frontegg/redux-store */ "../../dist/@frontegg/redux-store/constants.js");
|
|
326
326
|
/* harmony import */ var _frontegg_redux_store__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @frontegg/redux-store */ "../../dist/@frontegg/redux-store/auth/interfaces.js");
|
|
327
|
-
/* harmony import */ var
|
|
327
|
+
/* harmony import */ var _frontegg_redux_store__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! @frontegg/redux-store */ "../../dist/@frontegg/redux-store/toolkit/store.js");
|
|
328
328
|
/* harmony import */ var _frontegg_redux_store__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! @frontegg/redux-store */ "../../dist/@frontegg/redux-store/auth/Entitlements/helpers.js");
|
|
329
329
|
/* harmony import */ var _frontegg_redux_store__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! @frontegg/redux-store */ "../../dist/@frontegg/redux-store/auth/StepUpState/helpers.js");
|
|
330
330
|
/* harmony import */ var _frontegg_types__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! @frontegg/types */ "../../dist/@frontegg/types/index.js");
|
|
@@ -334,7 +334,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
334
334
|
/* harmony import */ var _frontegg_rest_api__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! @frontegg/rest-api */ "../../dist/@frontegg/rest-api/feature-flags/index.js");
|
|
335
335
|
/* harmony import */ var _frontegg_rest_api__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! @frontegg/rest-api */ "../../dist/@frontegg/rest-api/index.js");
|
|
336
336
|
/* harmony import */ var _frontegg_rest_api__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! @frontegg/rest-api */ "../../dist/@frontegg/rest-api/FetchClient.js");
|
|
337
|
-
/* harmony import */ var
|
|
337
|
+
/* harmony import */ var _frontegg_rest_api__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! @frontegg/rest-api */ "../../dist/@frontegg/rest-api/ContextHolder/index.js");
|
|
338
338
|
/* harmony import */ var _frontegg_rest_api__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! @frontegg/rest-api */ "../../dist/@frontegg/rest-api/interfaces.js");
|
|
339
339
|
/* harmony import */ var _version__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../version */ "../../dist/@frontegg/js/version.js");
|
|
340
340
|
/* harmony import */ var _utils_mockFlagsList__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../utils/mockFlagsList */ "../../dist/@frontegg/js/utils/mockFlagsList.js");
|
|
@@ -368,6 +368,7 @@ var FronteggApp = /*#__PURE__*/function () {
|
|
|
368
368
|
this.options = void 0;
|
|
369
369
|
this.loading = true;
|
|
370
370
|
this.cdnUrl = "https://assets.frontegg.com/admin-box/".concat(_version__WEBPACK_IMPORTED_MODULE_7__["default"].cdnVersion);
|
|
371
|
+
this.assetsUrl = "https://adminBox.frontegg.com/admin-box/".concat(_version__WEBPACK_IMPORTED_MODULE_7__["default"].cdnVersion);
|
|
371
372
|
this.customElementName = '';
|
|
372
373
|
this.adminPortalEl = void 0;
|
|
373
374
|
this.adminPortalRenderer = void 0;
|
|
@@ -539,6 +540,11 @@ var FronteggApp = /*#__PURE__*/function () {
|
|
|
539
540
|
if (this.options.cdnUrl) {
|
|
540
541
|
this.cdnUrl = this.options.cdnUrl;
|
|
541
542
|
}
|
|
543
|
+
if (this.options.assetsUrl) {
|
|
544
|
+
this.assetsUrl = this.options.assetsUrl;
|
|
545
|
+
}
|
|
546
|
+
_frontegg_rest_api__WEBPACK_IMPORTED_MODULE_17__.ContextHolder["for"](this.name).setCdnUrl(this.cdnUrl);
|
|
547
|
+
_frontegg_rest_api__WEBPACK_IMPORTED_MODULE_17__.ContextHolder["for"](this.name).setAssetsUrl(this.assetsUrl);
|
|
542
548
|
this.customElementName = customElementName;
|
|
543
549
|
var authOptions = this.options.authOptions ? Object.assign({}, this.options.authOptions, {
|
|
544
550
|
hostedLoginBox: this.options.hostedLoginBox
|
|
@@ -554,7 +560,7 @@ var FronteggApp = /*#__PURE__*/function () {
|
|
|
554
560
|
}
|
|
555
561
|
} else {
|
|
556
562
|
var _this$options$authOpt4, _this$options$auditsO;
|
|
557
|
-
this.store = (0,
|
|
563
|
+
this.store = (0,_frontegg_redux_store__WEBPACK_IMPORTED_MODULE_18__.createStore)({
|
|
558
564
|
context: this.options.contextOptions,
|
|
559
565
|
name: this.name,
|
|
560
566
|
builderMode: this.options.builderMode,
|
|
@@ -568,7 +574,7 @@ var FronteggApp = /*#__PURE__*/function () {
|
|
|
568
574
|
});
|
|
569
575
|
}
|
|
570
576
|
_AppHolder__WEBPACK_IMPORTED_MODULE_6__.AppHolder.setInstance(appName, this);
|
|
571
|
-
var contextHolder =
|
|
577
|
+
var contextHolder = _frontegg_rest_api__WEBPACK_IMPORTED_MODULE_17__.ContextHolder["for"](appName);
|
|
572
578
|
contextHolder.setAppName(appName);
|
|
573
579
|
this.setEntitlementsOptions(_options.entitlementsOptions);
|
|
574
580
|
this.setSessionContext({
|
|
@@ -589,16 +595,17 @@ var FronteggApp = /*#__PURE__*/function () {
|
|
|
589
595
|
(0,_babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_3__["default"])(FronteggApp, [{
|
|
590
596
|
key: "setEntitlementsOptions",
|
|
591
597
|
value: function setEntitlementsOptions(entitlementsOptions) {
|
|
592
|
-
|
|
598
|
+
_frontegg_rest_api__WEBPACK_IMPORTED_MODULE_17__.ContextHolder["for"](this.name).setEntitlementsOptions(Object.assign({}, entitlementsOptions));
|
|
593
599
|
}
|
|
594
600
|
}, {
|
|
595
601
|
key: "setSessionContext",
|
|
596
602
|
value: function setSessionContext(sessionContext) {
|
|
597
|
-
|
|
603
|
+
_frontegg_rest_api__WEBPACK_IMPORTED_MODULE_17__.ContextHolder["for"](this.name).setSessionContext(Object.assign({}, sessionContext));
|
|
598
604
|
}
|
|
599
605
|
}, {
|
|
600
606
|
key: "dispatchErrorByRequestName",
|
|
601
607
|
value: function dispatchErrorByRequestName(error, requestName) {
|
|
608
|
+
if ((error == null ? void 0 : error.statusCode) < 500) return;
|
|
602
609
|
this.store.dispatch({
|
|
603
610
|
type: 'auth/setErrorByRequestName',
|
|
604
611
|
payload: {
|
|
@@ -799,7 +806,7 @@ var FronteggApp = /*#__PURE__*/function () {
|
|
|
799
806
|
isMultiApp: false
|
|
800
807
|
}, isMultiApp = _ref4.isMultiApp;
|
|
801
808
|
_this$queryFeatureFla = this.queryFeatureFlags(['multi-apps-admin-portal']), _this$queryFeatureFla2 = (0,_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_0__["default"])(_this$queryFeatureFla, 1), multiAppsFlag = _this$queryFeatureFla2[0];
|
|
802
|
-
|
|
809
|
+
_frontegg_rest_api__WEBPACK_IMPORTED_MODULE_17__.ContextHolder["for"](this.name).setRequestSource(_frontegg_rest_api__WEBPACK_IMPORTED_MODULE_21__.RequestSource.AdminPortal);
|
|
803
810
|
_context6.next = 5;
|
|
804
811
|
return this.loadScript('FronteggAdminPortal');
|
|
805
812
|
case 5:
|
|
@@ -847,7 +854,7 @@ var FronteggApp = /*#__PURE__*/function () {
|
|
|
847
854
|
(_this$adminPortalRend = this.adminPortalRenderer) == null ? void 0 : _this$adminPortalRend.unmount();
|
|
848
855
|
// unmount is removing url search params, therefore we need to restore them after unmount
|
|
849
856
|
(0,_utils__WEBPACK_IMPORTED_MODULE_5__.restoreSearchParams)(searchParams);
|
|
850
|
-
|
|
857
|
+
_frontegg_rest_api__WEBPACK_IMPORTED_MODULE_17__.ContextHolder["for"](this.name).setRequestSource(null);
|
|
851
858
|
} catch (e) {
|
|
852
859
|
console.error('Failed to unmount admin portal', e);
|
|
853
860
|
}
|
|
@@ -1618,7 +1625,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1618
1625
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
1619
1626
|
/* harmony export */ });
|
|
1620
1627
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
|
|
1621
|
-
cdnVersion: '7.
|
|
1628
|
+
cdnVersion: '7.38.0-alpha.0'
|
|
1622
1629
|
});
|
|
1623
1630
|
|
|
1624
1631
|
/***/ }),
|
|
@@ -5275,23 +5282,23 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
5275
5282
|
/* harmony import */ var _interfaces__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../interfaces */ "../../dist/@frontegg/redux-store/auth/LoginState/interfaces.js");
|
|
5276
5283
|
/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../helpers */ "../../dist/@frontegg/redux-store/helpers/common.js");
|
|
5277
5284
|
/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../../helpers */ "../../dist/@frontegg/redux-store/helpers/handlers.js");
|
|
5285
|
+
/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../../helpers */ "../../dist/@frontegg/redux-store/helpers/gtm.js");
|
|
5278
5286
|
/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../../helpers */ "../../dist/@frontegg/redux-store/helpers/encoders.js");
|
|
5279
5287
|
/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../../../helpers */ "../../dist/@frontegg/redux-store/helpers/converters.js");
|
|
5280
5288
|
/* harmony import */ var _state__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../state */ "../../dist/@frontegg/redux-store/auth/LoginState/state.js");
|
|
5281
5289
|
/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../helpers */ "../../dist/@frontegg/redux-store/auth/LoginState/helpers.js");
|
|
5282
5290
|
/* harmony import */ var _frontegg_rest_api__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @frontegg/rest-api */ "../../dist/@frontegg/rest-api/ContextHolder/index.js");
|
|
5283
5291
|
/* harmony import */ var _frontegg_rest_api__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @frontegg/rest-api */ "../../dist/@frontegg/rest-api/auth/enums.js");
|
|
5292
|
+
/* harmony import */ var _frontegg_rest_api__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! @frontegg/rest-api */ "../../dist/@frontegg/rest-api/auth/utils.js");
|
|
5284
5293
|
/* harmony import */ var _frontegg_rest_api__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! @frontegg/rest-api */ "../../dist/@frontegg/rest-api/auth/interfaces.js");
|
|
5285
5294
|
/* harmony import */ var _hostedLoginAuthorize_actions__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./hostedLoginAuthorize.actions */ "../../dist/@frontegg/redux-store/auth/LoginState/actions/hostedLoginAuthorize.actions.js");
|
|
5286
5295
|
/* harmony import */ var _toolkit__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../toolkit */ "../../dist/@frontegg/redux-store/auth/Entitlements/helpers.js");
|
|
5287
5296
|
/* harmony import */ var _toolkit__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../../toolkit */ "../../dist/@frontegg/redux-store/toolkit/FronteggNativeModule.js");
|
|
5288
5297
|
/* harmony import */ var _interfaces__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../interfaces */ "../../dist/@frontegg/redux-store/auth/interfaces.js");
|
|
5289
5298
|
/* harmony import */ var _consts__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../consts */ "../../dist/@frontegg/redux-store/auth/LoginState/consts.js");
|
|
5290
|
-
/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../../helpers */ "../../dist/@frontegg/redux-store/helpers/gtm.js");
|
|
5291
5299
|
/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../helpers */ "../../dist/@frontegg/redux-store/auth/helpers.js");
|
|
5292
5300
|
/* harmony import */ var _MfaState_interfaces__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../../MfaState/interfaces */ "../../dist/@frontegg/redux-store/auth/MfaState/interfaces.js");
|
|
5293
5301
|
/* harmony import */ var _SSOState_interfaces__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../SSOState/interfaces */ "../../dist/@frontegg/redux-store/auth/SSOState/interfaces.js");
|
|
5294
|
-
/* harmony import */ var _frontegg_rest_api__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! @frontegg/rest-api */ "../../dist/@frontegg/rest-api/auth/utils.js");
|
|
5295
5302
|
/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../constants */ "../../dist/@frontegg/redux-store/constants.js");
|
|
5296
5303
|
|
|
5297
5304
|
|
|
@@ -5328,8 +5335,6 @@ const _excluded = ["callback", "error"],
|
|
|
5328
5335
|
|
|
5329
5336
|
|
|
5330
5337
|
|
|
5331
|
-
|
|
5332
|
-
|
|
5333
5338
|
|
|
5334
5339
|
|
|
5335
5340
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ((store, api, sharedActions) => {
|
|
@@ -5554,7 +5559,7 @@ const _excluded = ["callback", "error"],
|
|
|
5554
5559
|
};
|
|
5555
5560
|
const getRetryWithBlockingCallbackPayload = requestName => {
|
|
5556
5561
|
const callback = (_, error) => {
|
|
5557
|
-
if (!error) return;
|
|
5562
|
+
if (!error || error.statusCode < 500) return;
|
|
5558
5563
|
actions.setErrorByRequestName({
|
|
5559
5564
|
requestName,
|
|
5560
5565
|
traceId: (0,_helpers__WEBPACK_IMPORTED_MODULE_6__.errorTraceId)(error)
|
|
@@ -6277,14 +6282,29 @@ const _excluded = ["callback", "error"],
|
|
|
6277
6282
|
callback
|
|
6278
6283
|
} = payload;
|
|
6279
6284
|
try {
|
|
6285
|
+
actions.setAuthState({
|
|
6286
|
+
userIpData: {
|
|
6287
|
+
loading: true
|
|
6288
|
+
}
|
|
6289
|
+
});
|
|
6280
6290
|
const {
|
|
6281
|
-
ip
|
|
6291
|
+
ip,
|
|
6292
|
+
country_code
|
|
6282
6293
|
} = await api.metadata.getCurrentUserIpMetadata();
|
|
6283
6294
|
actions.setAuthState({
|
|
6284
|
-
|
|
6295
|
+
userIpData: {
|
|
6296
|
+
ip,
|
|
6297
|
+
countryCode: country_code,
|
|
6298
|
+
loading: false
|
|
6299
|
+
}
|
|
6285
6300
|
});
|
|
6286
6301
|
callback == null ? void 0 : callback(true);
|
|
6287
6302
|
} catch (e) {
|
|
6303
|
+
actions.setAuthState({
|
|
6304
|
+
userIpData: {
|
|
6305
|
+
loading: false
|
|
6306
|
+
}
|
|
6307
|
+
});
|
|
6288
6308
|
callback == null ? void 0 : callback(false);
|
|
6289
6309
|
}
|
|
6290
6310
|
};
|
|
@@ -6639,6 +6659,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
6639
6659
|
|
|
6640
6660
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ((store, api, _sharedActions) => {
|
|
6641
6661
|
const getMfaRequiredState = async (user, retryConfig, shouldContinueWhenFailing = false) => {
|
|
6662
|
+
var _user$mfaDevices, _user$mfaDevices$emai;
|
|
6642
6663
|
let step = _interfaces__WEBPACK_IMPORTED_MODULE_1__.LoginStep.loginWithTwoFactor;
|
|
6643
6664
|
const mfaState = {
|
|
6644
6665
|
step: _MfaState_interfaces__WEBPACK_IMPORTED_MODULE_2__.MFAStep.verify,
|
|
@@ -6657,7 +6678,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
6657
6678
|
throw e;
|
|
6658
6679
|
}
|
|
6659
6680
|
}
|
|
6660
|
-
const isEnrolled = !('mfaEnrolled' in user && !user.mfaEnrolled);
|
|
6681
|
+
const isEnrolled = !('mfaEnrolled' in user && !user.mfaEnrolled) || ((_user$mfaDevices = user.mfaDevices) == null ? void 0 : (_user$mfaDevices$emai = _user$mfaDevices.emails) == null ? void 0 : _user$mfaDevices$emai.length);
|
|
6661
6682
|
if (isEnrolled) {
|
|
6662
6683
|
Object.assign(mfaState, {
|
|
6663
6684
|
mfaDevices: user.mfaDevices,
|
|
@@ -11686,8 +11707,8 @@ const _excluded = ["callback"],
|
|
|
11686
11707
|
error: null
|
|
11687
11708
|
});
|
|
11688
11709
|
try {
|
|
11689
|
-
var _store$auth$
|
|
11690
|
-
const userIp = (_store$auth$
|
|
11710
|
+
var _store$auth$userIpDat, _store$auth$userIpDat2;
|
|
11711
|
+
const userIp = (_store$auth$userIpDat = (_store$auth$userIpDat2 = store.auth.userIpData) == null ? void 0 : _store$auth$userIpDat2.ip) != null ? _store$auth$userIpDat : '';
|
|
11691
11712
|
await Promise.all([api.auth.createIPRestriction({
|
|
11692
11713
|
ip: userIp,
|
|
11693
11714
|
isActive: true,
|
|
@@ -15816,23 +15837,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
15816
15837
|
/* harmony export */ });
|
|
15817
15838
|
/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "../../node_modules/@babel/runtime/helpers/esm/extends.js");
|
|
15818
15839
|
/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutPropertiesLoose */ "../../node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js");
|
|
15819
|
-
/* harmony import */ var _AcceptInvitationState_interfaces__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./AcceptInvitationState/interfaces */ "../../dist/@frontegg/redux-store/auth/AcceptInvitationState/interfaces.js");
|
|
15820
|
-
/* harmony import */ var _ActivateAccountState_interfaces__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./ActivateAccountState/interfaces */ "../../dist/@frontegg/redux-store/auth/ActivateAccountState/interfaces.js");
|
|
15821
|
-
/* harmony import */ var _ApiTokensState_interfaces__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./ApiTokensState/interfaces */ "../../dist/@frontegg/redux-store/auth/ApiTokensState/interfaces.js");
|
|
15822
|
-
/* harmony import */ var _Entitlements_helpers__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Entitlements/helpers */ "../../dist/@frontegg/redux-store/auth/Entitlements/helpers.js");
|
|
15823
|
-
/* harmony import */ var _ForgotPasswordState_interfaces__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./ForgotPasswordState/interfaces */ "../../dist/@frontegg/redux-store/auth/ForgotPasswordState/interfaces.js");
|
|
15824
|
-
/* harmony import */ var _GroupsState_interfaces__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./GroupsState/interfaces */ "../../dist/@frontegg/redux-store/auth/GroupsState/interfaces.js");
|
|
15825
|
-
/* harmony import */ var _ImpersonateState_interfaces__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./ImpersonateState/interfaces */ "../../dist/@frontegg/redux-store/auth/ImpersonateState/interfaces.js");
|
|
15826
|
-
/* harmony import */ var _LoginState_interfaces__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./LoginState/interfaces */ "../../dist/@frontegg/redux-store/auth/LoginState/interfaces.js");
|
|
15827
|
-
/* harmony import */ var _MfaState_interfaces__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./MfaState/interfaces */ "../../dist/@frontegg/redux-store/auth/MfaState/interfaces.js");
|
|
15828
|
-
/* harmony import */ var _MSP_interfaces__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./MSP/interfaces */ "../../dist/@frontegg/redux-store/auth/MSP/interfaces/index.js");
|
|
15829
|
-
/* harmony import */ var _ResetPhoneNumberState_interfaces__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./ResetPhoneNumberState/interfaces */ "../../dist/@frontegg/redux-store/auth/ResetPhoneNumberState/interfaces.js");
|
|
15830
|
-
/* harmony import */ var _RolesState_interfaces__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./RolesState/interfaces */ "../../dist/@frontegg/redux-store/auth/RolesState/interfaces.js");
|
|
15831
|
-
/* harmony import */ var _Security_SecurityCenterState_interfaces__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./Security/SecurityCenterState/interfaces */ "../../dist/@frontegg/redux-store/auth/Security/SecurityCenterState/interfaces.js");
|
|
15832
|
-
/* harmony import */ var _SignUpState_interfaces__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./SignUpState/interfaces */ "../../dist/@frontegg/redux-store/auth/SignUpState/interfaces.js");
|
|
15833
|
-
/* harmony import */ var _SSOState_interfaces__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./SSOState/interfaces */ "../../dist/@frontegg/redux-store/auth/SSOState/interfaces.js");
|
|
15834
|
-
/* harmony import */ var _TeamState_interfaces__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./TeamState/interfaces */ "../../dist/@frontegg/redux-store/auth/TeamState/interfaces.js");
|
|
15835
|
-
/* harmony import */ var _interfaces__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./interfaces */ "../../dist/@frontegg/redux-store/auth/interfaces.js");
|
|
15836
15840
|
/* harmony import */ var _AcceptInvitationState__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./AcceptInvitationState */ "../../dist/@frontegg/redux-store/auth/AcceptInvitationState/state.js");
|
|
15837
15841
|
/* harmony import */ var _AcceptInvitationState__WEBPACK_IMPORTED_MODULE_54__ = __webpack_require__(/*! ./AcceptInvitationState */ "../../dist/@frontegg/redux-store/auth/AcceptInvitationState/actions.js");
|
|
15838
15842
|
/* harmony import */ var _AccountSettingsState__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./AccountSettingsState */ "../../dist/@frontegg/redux-store/auth/AccountSettingsState/state.js");
|
|
@@ -15860,8 +15864,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
15860
15864
|
/* harmony import */ var _MfaState__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ./MfaState */ "../../dist/@frontegg/redux-store/auth/MfaState/state.js");
|
|
15861
15865
|
/* harmony import */ var _MfaState__WEBPACK_IMPORTED_MODULE_67__ = __webpack_require__(/*! ./MfaState */ "../../dist/@frontegg/redux-store/auth/MfaState/actions.js");
|
|
15862
15866
|
/* harmony import */ var _MSP__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ./MSP */ "../../dist/@frontegg/redux-store/auth/MSP/state.js");
|
|
15863
|
-
/* harmony import */ var _MSP__WEBPACK_IMPORTED_MODULE_68__ = __webpack_require__(/*! ./MSP */ "../../dist/@frontegg/redux-store/auth/MSP/actions.js");
|
|
15864
15867
|
/* harmony import */ var _MSP__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ./MSP */ "../../dist/@frontegg/redux-store/auth/MSP/dialogs/state.js");
|
|
15868
|
+
/* harmony import */ var _MSP__WEBPACK_IMPORTED_MODULE_68__ = __webpack_require__(/*! ./MSP */ "../../dist/@frontegg/redux-store/auth/MSP/actions.js");
|
|
15865
15869
|
/* harmony import */ var _MSP__WEBPACK_IMPORTED_MODULE_69__ = __webpack_require__(/*! ./MSP */ "../../dist/@frontegg/redux-store/auth/MSP/dialogs/actions.js");
|
|
15866
15870
|
/* harmony import */ var _PasskeysState__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! ./PasskeysState */ "../../dist/@frontegg/redux-store/auth/PasskeysState/state.js");
|
|
15867
15871
|
/* harmony import */ var _PasskeysState__WEBPACK_IMPORTED_MODULE_70__ = __webpack_require__(/*! ./PasskeysState */ "../../dist/@frontegg/redux-store/auth/PasskeysState/actions.js");
|
|
@@ -15901,6 +15905,23 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
15901
15905
|
/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_53__ = __webpack_require__(/*! ../helpers */ "../../dist/@frontegg/redux-store/helpers/common.js");
|
|
15902
15906
|
/* harmony import */ var _Entitlements__WEBPACK_IMPORTED_MODULE_61__ = __webpack_require__(/*! ./Entitlements */ "../../dist/@frontegg/redux-store/auth/Entitlements/actions.js");
|
|
15903
15907
|
/* harmony import */ var _toolkit_proxy__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../toolkit/proxy */ "../../dist/@frontegg/redux-store/toolkit/proxy.js");
|
|
15908
|
+
/* harmony import */ var _AcceptInvitationState_interfaces__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./AcceptInvitationState/interfaces */ "../../dist/@frontegg/redux-store/auth/AcceptInvitationState/interfaces.js");
|
|
15909
|
+
/* harmony import */ var _ActivateAccountState_interfaces__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./ActivateAccountState/interfaces */ "../../dist/@frontegg/redux-store/auth/ActivateAccountState/interfaces.js");
|
|
15910
|
+
/* harmony import */ var _ApiTokensState_interfaces__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./ApiTokensState/interfaces */ "../../dist/@frontegg/redux-store/auth/ApiTokensState/interfaces.js");
|
|
15911
|
+
/* harmony import */ var _Entitlements_helpers__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Entitlements/helpers */ "../../dist/@frontegg/redux-store/auth/Entitlements/helpers.js");
|
|
15912
|
+
/* harmony import */ var _ForgotPasswordState_interfaces__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./ForgotPasswordState/interfaces */ "../../dist/@frontegg/redux-store/auth/ForgotPasswordState/interfaces.js");
|
|
15913
|
+
/* harmony import */ var _GroupsState_interfaces__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./GroupsState/interfaces */ "../../dist/@frontegg/redux-store/auth/GroupsState/interfaces.js");
|
|
15914
|
+
/* harmony import */ var _ImpersonateState_interfaces__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./ImpersonateState/interfaces */ "../../dist/@frontegg/redux-store/auth/ImpersonateState/interfaces.js");
|
|
15915
|
+
/* harmony import */ var _LoginState_interfaces__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./LoginState/interfaces */ "../../dist/@frontegg/redux-store/auth/LoginState/interfaces.js");
|
|
15916
|
+
/* harmony import */ var _MfaState_interfaces__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./MfaState/interfaces */ "../../dist/@frontegg/redux-store/auth/MfaState/interfaces.js");
|
|
15917
|
+
/* harmony import */ var _MSP_interfaces__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./MSP/interfaces */ "../../dist/@frontegg/redux-store/auth/MSP/interfaces/index.js");
|
|
15918
|
+
/* harmony import */ var _ResetPhoneNumberState_interfaces__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./ResetPhoneNumberState/interfaces */ "../../dist/@frontegg/redux-store/auth/ResetPhoneNumberState/interfaces.js");
|
|
15919
|
+
/* harmony import */ var _RolesState_interfaces__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./RolesState/interfaces */ "../../dist/@frontegg/redux-store/auth/RolesState/interfaces.js");
|
|
15920
|
+
/* harmony import */ var _Security_SecurityCenterState_interfaces__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./Security/SecurityCenterState/interfaces */ "../../dist/@frontegg/redux-store/auth/Security/SecurityCenterState/interfaces.js");
|
|
15921
|
+
/* harmony import */ var _SignUpState_interfaces__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./SignUpState/interfaces */ "../../dist/@frontegg/redux-store/auth/SignUpState/interfaces.js");
|
|
15922
|
+
/* harmony import */ var _SSOState_interfaces__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./SSOState/interfaces */ "../../dist/@frontegg/redux-store/auth/SSOState/interfaces.js");
|
|
15923
|
+
/* harmony import */ var _TeamState_interfaces__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./TeamState/interfaces */ "../../dist/@frontegg/redux-store/auth/TeamState/interfaces.js");
|
|
15924
|
+
/* harmony import */ var _interfaces__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./interfaces */ "../../dist/@frontegg/redux-store/auth/interfaces.js");
|
|
15904
15925
|
|
|
15905
15926
|
|
|
15906
15927
|
const _excluded = ["routes"],
|
|
@@ -15972,7 +15993,6 @@ const _excluded = ["routes"],
|
|
|
15972
15993
|
|
|
15973
15994
|
|
|
15974
15995
|
|
|
15975
|
-
|
|
15976
15996
|
|
|
15977
15997
|
|
|
15978
15998
|
const createAuthState = _overrideState => {
|
|
@@ -15990,7 +16010,9 @@ const createAuthState = _overrideState => {
|
|
|
15990
16010
|
user: null,
|
|
15991
16011
|
error: undefined,
|
|
15992
16012
|
errorByRequest: {},
|
|
15993
|
-
|
|
16013
|
+
userIpData: {
|
|
16014
|
+
loading: false
|
|
16015
|
+
}
|
|
15994
16016
|
}, overrideState, {
|
|
15995
16017
|
// nested states
|
|
15996
16018
|
acceptInvitationState: (0,_AcceptInvitationState__WEBPACK_IMPORTED_MODULE_21__["default"])(overrideState == null ? void 0 : overrideState.acceptInvitationState),
|
|
@@ -17905,7 +17927,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
17905
17927
|
/* harmony import */ var _subscriptions_interfaces__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./subscriptions/interfaces */ "../../dist/@frontegg/redux-store/subscriptions/interfaces.js");
|
|
17906
17928
|
/* harmony import */ var _vendor__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./vendor */ "../../dist/@frontegg/redux-store/vendor/index.js");
|
|
17907
17929
|
/* harmony import */ var _audits__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./audits */ "../../dist/@frontegg/redux-store/audits/index.js");
|
|
17908
|
-
/** @license Frontegg v7.
|
|
17930
|
+
/** @license Frontegg v7.38.0-alpha.0
|
|
17909
17931
|
*
|
|
17910
17932
|
* This source code is licensed under the MIT license found in the
|
|
17911
17933
|
* LICENSE file in the root directory of this source tree.
|
|
@@ -19210,7 +19232,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
19210
19232
|
ip
|
|
19211
19233
|
} = _dummy__WEBPACK_IMPORTED_MODULE_2__.dummyIps[0];
|
|
19212
19234
|
await actions.setAuthState({
|
|
19213
|
-
|
|
19235
|
+
userIpData: {
|
|
19236
|
+
ip
|
|
19237
|
+
}
|
|
19214
19238
|
});
|
|
19215
19239
|
callback == null ? void 0 : callback(true, ip);
|
|
19216
19240
|
} catch (e) {
|
|
@@ -25070,6 +25094,8 @@ class ContextHolder {
|
|
|
25070
25094
|
this.appName = null;
|
|
25071
25095
|
this.sessionContext = void 0;
|
|
25072
25096
|
this.basename = null;
|
|
25097
|
+
this.cdnUrl = null;
|
|
25098
|
+
this.assetsUrl = null;
|
|
25073
25099
|
this.setContext = context => {
|
|
25074
25100
|
this.context = context;
|
|
25075
25101
|
};
|
|
@@ -25125,6 +25151,18 @@ class ContextHolder {
|
|
|
25125
25151
|
this.getAppName = () => {
|
|
25126
25152
|
return this.appName;
|
|
25127
25153
|
};
|
|
25154
|
+
this.setCdnUrl = cdnUrl => {
|
|
25155
|
+
this.cdnUrl = cdnUrl;
|
|
25156
|
+
};
|
|
25157
|
+
this.getCdnUrl = () => {
|
|
25158
|
+
return this.cdnUrl;
|
|
25159
|
+
};
|
|
25160
|
+
this.setAssetsUrl = assets => {
|
|
25161
|
+
this.assetsUrl = assets;
|
|
25162
|
+
};
|
|
25163
|
+
this.getAssetsUrl = () => {
|
|
25164
|
+
return this.assetsUrl;
|
|
25165
|
+
};
|
|
25128
25166
|
}
|
|
25129
25167
|
static default() {
|
|
25130
25168
|
return ContextHolder.getInstance(DEFAULT_APP_NAME);
|
|
@@ -27838,7 +27876,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
27838
27876
|
/* harmony import */ var _entitlements_interfaces__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./entitlements/interfaces */ "../../dist/@frontegg/rest-api/entitlements/interfaces.js");
|
|
27839
27877
|
/* harmony import */ var _security_center_interfaces__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./security-center/interfaces */ "../../dist/@frontegg/rest-api/security-center/interfaces.js");
|
|
27840
27878
|
/* harmony import */ var _applications_interfaces__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./applications/interfaces */ "../../dist/@frontegg/rest-api/applications/interfaces.js");
|
|
27841
|
-
/** @license Frontegg v7.
|
|
27879
|
+
/** @license Frontegg v7.38.0-alpha.0
|
|
27842
27880
|
*
|
|
27843
27881
|
* This source code is licensed under the MIT license found in the
|
|
27844
27882
|
* LICENSE file in the root directory of this source tree.
|
|
@@ -30468,7 +30506,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
30468
30506
|
/* harmony export */ });
|
|
30469
30507
|
/* harmony import */ var _ThemeOptions__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ThemeOptions */ "../../dist/@frontegg/types/ThemeOptions/index.js");
|
|
30470
30508
|
/* harmony import */ var _Metadata__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Metadata */ "../../dist/@frontegg/types/Metadata/index.js");
|
|
30471
|
-
/** @license Frontegg v7.
|
|
30509
|
+
/** @license Frontegg v7.38.0-alpha.0
|
|
30472
30510
|
*
|
|
30473
30511
|
* This source code is licensed under the MIT license found in the
|
|
30474
30512
|
* LICENSE file in the root directory of this source tree.
|