@frontegg/js 6.165.0-alpha.9 → 6.165.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 CHANGED
@@ -1,4 +1,4 @@
1
- /** @license Frontegg v6.165.0-alpha.9
1
+ /** @license Frontegg v6.165.0
2
2
  *
3
3
  * This source code is licensed under the MIT license found in the
4
4
  * LICENSE file in the root directory of this source tree.
package/node/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license Frontegg v6.165.0-alpha.9
1
+ /** @license Frontegg v6.165.0
2
2
  *
3
3
  * This source code is licensed under the MIT license found in the
4
4
  * LICENSE file in the root directory of this source tree.
package/node/version.js CHANGED
@@ -5,6 +5,6 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports["default"] = void 0;
7
7
  var _default = {
8
- cdnVersion: '6.165.0-alpha.9'
8
+ cdnVersion: '6.165.0'
9
9
  };
10
10
  exports["default"] = _default;
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@frontegg/js",
3
- "version": "6.165.0-alpha.9",
3
+ "version": "6.165.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": "6.165.0-alpha.9"
9
+ "@frontegg/types": "6.165.0"
10
10
  },
11
11
  "browserslist": {
12
12
  "production": [
@@ -1417,7 +1417,7 @@ __webpack_require__.r(__webpack_exports__);
1417
1417
  /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
1418
1418
  /* harmony export */ });
1419
1419
  /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
1420
- cdnVersion: '6.165.0-alpha.9'
1420
+ cdnVersion: '6.165.0'
1421
1421
  });
1422
1422
 
1423
1423
  /***/ }),
@@ -5858,20 +5858,20 @@ __webpack_require__.r(__webpack_exports__);
5858
5858
  /* harmony import */ var _interfaces__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../interfaces */ "../../dist/@frontegg/redux-store/auth/interfaces.js");
5859
5859
  /* harmony import */ var _interfaces__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./interfaces */ "../../dist/@frontegg/redux-store/auth/LoginState/interfaces.js");
5860
5860
  /* harmony import */ var _sagas_mfaRequiredState_saga__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./sagas/mfaRequiredState.saga */ "../../dist/@frontegg/redux-store/auth/LoginState/sagas/mfaRequiredState.saga.js");
5861
- /* harmony import */ var _SignUp_saga__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../SignUp/saga */ "../../dist/@frontegg/redux-store/auth/SignUp/saga.js");
5861
+ /* harmony import */ var _SignUp_saga__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../SignUp/saga */ "../../dist/@frontegg/redux-store/auth/SignUp/saga.js");
5862
5862
  /* harmony import */ var _MfaState_interfaces__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ../MfaState/interfaces */ "../../dist/@frontegg/redux-store/auth/MfaState/interfaces.js");
5863
5863
  /* harmony import */ var _dummy__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ../dummy */ "../../dist/@frontegg/redux-store/auth/dummy.js");
5864
5864
  /* harmony import */ var _SSOState_interfaces__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ../SSOState/interfaces */ "../../dist/@frontegg/redux-store/auth/SSOState/interfaces.js");
5865
- /* harmony import */ var _vendor_saga__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../vendor/saga */ "../../dist/@frontegg/redux-store/vendor/saga.js");
5865
+ /* harmony import */ var _vendor_saga__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../vendor/saga */ "../../dist/@frontegg/redux-store/vendor/saga.js");
5866
5866
  /* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../helpers */ "../../dist/@frontegg/redux-store/helpers.js");
5867
5867
  /* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ../utils */ "../../dist/@frontegg/redux-store/auth/utils.js");
5868
- /* harmony import */ var _Security_SecurityPolicyState_saga__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../Security/SecurityPolicyState/saga */ "../../dist/@frontegg/redux-store/auth/Security/SecurityPolicyState/saga.js");
5868
+ /* harmony import */ var _Security_SecurityPolicyState_saga__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../Security/SecurityPolicyState/saga */ "../../dist/@frontegg/redux-store/auth/Security/SecurityPolicyState/saga.js");
5869
5869
  /* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./utils */ "../../dist/@frontegg/redux-store/auth/LoginState/utils.js");
5870
5870
  /* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../../utils */ "../../dist/@frontegg/redux-store/utils/errorHandler.js");
5871
5871
  /* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../../utils */ "../../dist/@frontegg/redux-store/utils/gtm.js");
5872
5872
  /* harmony import */ var _consts__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./consts */ "../../dist/@frontegg/redux-store/auth/LoginState/consts.js");
5873
5873
  /* harmony import */ var _Entitlements__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Entitlements */ "../../dist/@frontegg/redux-store/auth/Entitlements/saga.js");
5874
- /* harmony import */ var _CustomLoginState_saga__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../CustomLoginState/saga */ "../../dist/@frontegg/redux-store/auth/CustomLoginState/saga.js");
5874
+ /* harmony import */ var _CustomLoginState_saga__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../CustomLoginState/saga */ "../../dist/@frontegg/redux-store/auth/CustomLoginState/saga.js");
5875
5875
  /* harmony import */ var _toolkit__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ../../toolkit */ "../../dist/@frontegg/redux-store/toolkit/FronteggNativeModule.js");
5876
5876
  /* harmony import */ var _saga_utils__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./saga.utils */ "../../dist/@frontegg/redux-store/auth/LoginState/saga.utils.js");
5877
5877
  /* harmony import */ var _sagas__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./sagas/afterAuthNavigation.saga */ "../../dist/@frontegg/redux-store/auth/LoginState/sagas/afterAuthNavigation.saga.js");
@@ -6230,30 +6230,29 @@ function* requestAuthorize({
6230
6230
  payload: firstTime
6231
6231
  }) {
6232
6232
  const calls = [];
6233
- const isCustomLoginEnabled = yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_2__.call)(_CustomLoginState_saga__WEBPACK_IMPORTED_MODULE_12__.customLoginEnabled);
6234
- if (isCustomLoginEnabled) {
6235
- /*
6236
- // waiting for refreshToken to be loaded is only necessary for custom login
6237
- // but doing this will degrade the loading performance in around 500 ms
6238
- // so we will wait for the refreshToken only if there is tenantResolver
6239
- */
6240
- yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_2__.call)(refreshToken);
6241
- } else {
6242
- calls.push((0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_2__.call)(refreshToken));
6243
- }
6233
+ const callsAfterRefresh = [];
6234
+ calls.push((0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_2__.call)(refreshToken));
6244
6235
  if (firstTime) {
6245
6236
  yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_2__.put)(_reducer__WEBPACK_IMPORTED_MODULE_5__.actions.setState({
6246
6237
  isLoading: true
6247
6238
  }));
6248
6239
  yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_2__.put)(_reducer__WEBPACK_IMPORTED_MODULE_5__.actions.loadSocialLoginsConfigurationV2());
6249
- calls.push((0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_2__.call)(_SignUp_saga__WEBPACK_IMPORTED_MODULE_13__.loadAllowSignUps));
6250
- calls.push((0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_2__.call)(_Security_SecurityPolicyState_saga__WEBPACK_IMPORTED_MODULE_14__.loadPublicAuthStrategiesPolicy));
6240
+ calls.push((0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_2__.call)(_SignUp_saga__WEBPACK_IMPORTED_MODULE_12__.loadAllowSignUps));
6241
+ calls.push((0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_2__.call)(_Security_SecurityPolicyState_saga__WEBPACK_IMPORTED_MODULE_13__.loadPublicAuthStrategiesPolicy));
6251
6242
  calls.push((0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_2__.call)(loadSSOPublicConfigurationFunction));
6252
- calls.push((0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_2__.call)(_vendor_saga__WEBPACK_IMPORTED_MODULE_15__.loadVendorPublicInfo));
6243
+ calls.push((0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_2__.call)(_vendor_saga__WEBPACK_IMPORTED_MODULE_14__.loadVendorPublicInfo));
6253
6244
  calls.push((0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_2__.call)(refreshMetadata));
6254
- calls.push((0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_2__.call)(_CustomLoginState_saga__WEBPACK_IMPORTED_MODULE_12__.loadCustomLoginRoutes));
6245
+ /*
6246
+ We will load custom login routes only if custom login is enabled
6247
+ In order to check if custom login is enabled without the tenant alias (search-param/sub-domain)
6248
+ we have to wait for the user state (refreshToken request)
6249
+ */
6250
+ callsAfterRefresh.push((0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_2__.call)(_CustomLoginState_saga__WEBPACK_IMPORTED_MODULE_15__.loadCustomLoginRoutes));
6255
6251
  }
6256
6252
  yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_2__.all)(calls);
6253
+ if (callsAfterRefresh.length > 0) {
6254
+ yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_2__.all)(callsAfterRefresh);
6255
+ }
6257
6256
  yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_2__.put)(_reducer__WEBPACK_IMPORTED_MODULE_5__.actions.setState({
6258
6257
  isLoading: false
6259
6258
  }));
@@ -6286,12 +6285,12 @@ function* requestAuthorizeSSR({
6286
6285
  }) {
6287
6286
  const calls = [];
6288
6287
  yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_2__.put)(_reducer__WEBPACK_IMPORTED_MODULE_5__.actions.loadSocialLoginsConfigurationV2());
6289
- calls.push((0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_2__.call)(_SignUp_saga__WEBPACK_IMPORTED_MODULE_13__.loadAllowSignUps));
6288
+ calls.push((0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_2__.call)(_SignUp_saga__WEBPACK_IMPORTED_MODULE_12__.loadAllowSignUps));
6290
6289
  calls.push((0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_2__.call)(loadSSOPublicConfigurationFunction));
6291
- calls.push((0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_2__.call)(_vendor_saga__WEBPACK_IMPORTED_MODULE_15__.loadVendorPublicInfo));
6290
+ calls.push((0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_2__.call)(_vendor_saga__WEBPACK_IMPORTED_MODULE_14__.loadVendorPublicInfo));
6292
6291
  calls.push((0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_2__.call)(refreshMetadata));
6293
6292
  calls.push((0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_2__.call)(isMFARequiredSSR, payload));
6294
- calls.push((0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_2__.call)(_CustomLoginState_saga__WEBPACK_IMPORTED_MODULE_12__.loadCustomLoginRoutes));
6293
+ calls.push((0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_2__.call)(_CustomLoginState_saga__WEBPACK_IMPORTED_MODULE_15__.loadCustomLoginRoutes));
6295
6294
  yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_2__.all)(calls);
6296
6295
  }
6297
6296
  const getUri = urlStrategy => {
@@ -6419,7 +6418,7 @@ function* requestHostedLoginAuthorize(additionalParams) {
6419
6418
  // We are saving the verifier in session storage to be able to validate the response
6420
6419
  localStorage.setItem(_constants__WEBPACK_IMPORTED_MODULE_17__.HOSTED_LOGIN_VERIFIER_KEY, code_verifier);
6421
6420
  let redirectUrl = `${window.location.origin}${urlStrategy === 'path' ? '' : '#'}${routes.hostedLoginRedirectUrl}`;
6422
- yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_2__.call)(_CustomLoginState_saga__WEBPACK_IMPORTED_MODULE_12__.loadCustomLoginRoutes);
6421
+ yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_2__.call)(_CustomLoginState_saga__WEBPACK_IMPORTED_MODULE_15__.loadCustomLoginRoutes);
6423
6422
  const customLoginSearchParam = yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_2__.select)(state => {
6424
6423
  var _state$auth$customLog;
6425
6424
  return (_state$auth$customLog = state.auth.customLoginState) == null ? void 0 : _state$auth$customLog.customLoginSearchParams;
@@ -6472,7 +6471,7 @@ function* handleHostedLoginCallback({
6472
6471
  urlStrategy: state.root.urlStrategy
6473
6472
  }));
6474
6473
  let redirectUrl = `${window.location.origin}${urlStrategy === 'path' ? '' : '#'}${routes.hostedLoginRedirectUrl}`;
6475
- yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_2__.call)(_CustomLoginState_saga__WEBPACK_IMPORTED_MODULE_12__.loadCustomLoginRoutes);
6474
+ yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_2__.call)(_CustomLoginState_saga__WEBPACK_IMPORTED_MODULE_15__.loadCustomLoginRoutes);
6476
6475
  const customLoginSearchParam = yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_2__.select)(state => {
6477
6476
  var _state$auth$customLog2;
6478
6477
  return (_state$auth$customLog2 = state.auth.customLoginState) == null ? void 0 : _state$auth$customLog2.customLoginSearchParams;
@@ -24569,7 +24568,7 @@ __webpack_require__.r(__webpack_exports__);
24569
24568
  /* harmony export */ });
24570
24569
  /* harmony import */ var _ThemeOptions__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ThemeOptions */ "../../dist/@frontegg/types/ThemeOptions/index.js");
24571
24570
  /* harmony import */ var _Metadata__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Metadata */ "../../dist/@frontegg/types/Metadata/index.js");
24572
- /** @license Frontegg v6.165.0-alpha.9
24571
+ /** @license Frontegg v6.165.0
24573
24572
  *
24574
24573
  * This source code is licensed under the MIT license found in the
24575
24574
  * LICENSE file in the root directory of this source tree.
@@ -28348,7 +28347,7 @@ __webpack_require__.r(__webpack_exports__);
28348
28347
  /* harmony import */ var _users_interfaces__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./users/interfaces */ "../../node_modules/@frontegg/rest-api/users/interfaces.js");
28349
28348
  /* harmony import */ var _entitlements_interfaces__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./entitlements/interfaces */ "../../node_modules/@frontegg/rest-api/entitlements/interfaces.js");
28350
28349
  /* harmony import */ var _security_center_interfaces__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./security-center/interfaces */ "../../node_modules/@frontegg/rest-api/security-center/interfaces.js");
28351
- /** @license Frontegg v3.1.55
28350
+ /** @license Frontegg v3.1.56
28352
28351
  *
28353
28352
  * This source code is licensed under the MIT license found in the
28354
28353
  * LICENSE file in the root directory of this source tree.