@frontegg/js 6.165.0-alpha.4 → 6.165.0-alpha.6

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.
@@ -563,7 +563,8 @@ export var FronteggApp = /*#__PURE__*/function () {
563
563
  stepUpUrl = _ref4.routes.stepUpUrl;
564
564
  if (hostedLoginBox) {
565
565
  this.store.dispatch({
566
- type: 'auth/stepUpHostedLogin'
566
+ type: 'auth/stepUpHostedLogin',
567
+ payload: options
567
568
  });
568
569
  return;
569
570
  }
package/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license Frontegg v6.165.0-alpha.4
1
+ /** @license Frontegg v6.165.0-alpha.6
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.
@@ -570,7 +570,8 @@ var FronteggApp = /*#__PURE__*/function () {
570
570
  stepUpUrl = _ref4.routes.stepUpUrl;
571
571
  if (hostedLoginBox) {
572
572
  this.store.dispatch({
573
- type: 'auth/stepUpHostedLogin'
573
+ type: 'auth/stepUpHostedLogin',
574
+ payload: options
574
575
  });
575
576
  return;
576
577
  }
package/node/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license Frontegg v6.165.0-alpha.4
1
+ /** @license Frontegg v6.165.0-alpha.6
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.4'
8
+ cdnVersion: '6.165.0-alpha.6'
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.4",
3
+ "version": "6.165.0-alpha.6",
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.4"
9
+ "@frontegg/types": "6.165.0-alpha.6"
10
10
  },
11
11
  "browserslist": {
12
12
  "production": [
@@ -884,7 +884,8 @@ var FronteggApp = /*#__PURE__*/function () {
884
884
  stepUpUrl = _ref4.routes.stepUpUrl;
885
885
  if (hostedLoginBox) {
886
886
  this.store.dispatch({
887
- type: 'auth/stepUpHostedLogin'
887
+ type: 'auth/stepUpHostedLogin',
888
+ payload: options
888
889
  });
889
890
  return;
890
891
  }
@@ -1452,7 +1453,7 @@ __webpack_require__.r(__webpack_exports__);
1452
1453
  /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
1453
1454
  /* harmony export */ });
1454
1455
  /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
1455
- cdnVersion: '6.165.0-alpha.4'
1456
+ cdnVersion: '6.165.0-alpha.6'
1456
1457
  });
1457
1458
 
1458
1459
  /***/ }),
@@ -5897,20 +5898,20 @@ __webpack_require__.r(__webpack_exports__);
5897
5898
  /* harmony import */ var _interfaces__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../interfaces */ "../../dist/@frontegg/redux-store/auth/interfaces.js");
5898
5899
  /* harmony import */ var _interfaces__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./interfaces */ "../../dist/@frontegg/redux-store/auth/LoginState/interfaces.js");
5899
5900
  /* 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");
5900
- /* harmony import */ var _SignUp_saga__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../SignUp/saga */ "../../dist/@frontegg/redux-store/auth/SignUp/saga.js");
5901
+ /* harmony import */ var _SignUp_saga__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../SignUp/saga */ "../../dist/@frontegg/redux-store/auth/SignUp/saga.js");
5901
5902
  /* harmony import */ var _MfaState_interfaces__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ../MfaState/interfaces */ "../../dist/@frontegg/redux-store/auth/MfaState/interfaces.js");
5902
5903
  /* harmony import */ var _dummy__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ../dummy */ "../../dist/@frontegg/redux-store/auth/dummy.js");
5903
5904
  /* harmony import */ var _SSOState_interfaces__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ../SSOState/interfaces */ "../../dist/@frontegg/redux-store/auth/SSOState/interfaces.js");
5904
- /* harmony import */ var _vendor_saga__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../vendor/saga */ "../../dist/@frontegg/redux-store/vendor/saga.js");
5905
+ /* harmony import */ var _vendor_saga__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../vendor/saga */ "../../dist/@frontegg/redux-store/vendor/saga.js");
5905
5906
  /* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../helpers */ "../../dist/@frontegg/redux-store/helpers.js");
5906
5907
  /* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ../utils */ "../../dist/@frontegg/redux-store/auth/utils.js");
5907
- /* harmony import */ var _Security_SecurityPolicyState_saga__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../Security/SecurityPolicyState/saga */ "../../dist/@frontegg/redux-store/auth/Security/SecurityPolicyState/saga.js");
5908
+ /* harmony import */ var _Security_SecurityPolicyState_saga__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../Security/SecurityPolicyState/saga */ "../../dist/@frontegg/redux-store/auth/Security/SecurityPolicyState/saga.js");
5908
5909
  /* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./utils */ "../../dist/@frontegg/redux-store/auth/LoginState/utils.js");
5909
5910
  /* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../../utils */ "../../dist/@frontegg/redux-store/utils/errorHandler.js");
5910
5911
  /* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../../utils */ "../../dist/@frontegg/redux-store/utils/gtm.js");
5911
5912
  /* harmony import */ var _consts__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./consts */ "../../dist/@frontegg/redux-store/auth/LoginState/consts.js");
5912
5913
  /* harmony import */ var _Entitlements__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Entitlements */ "../../dist/@frontegg/redux-store/auth/Entitlements/saga.js");
5913
- /* harmony import */ var _CustomLoginState_saga__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../CustomLoginState/saga */ "../../dist/@frontegg/redux-store/auth/CustomLoginState/saga.js");
5914
+ /* harmony import */ var _CustomLoginState_saga__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../CustomLoginState/saga */ "../../dist/@frontegg/redux-store/auth/CustomLoginState/saga.js");
5914
5915
  /* harmony import */ var _toolkit__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ../../toolkit */ "../../dist/@frontegg/redux-store/toolkit/FronteggNativeModule.js");
5915
5916
  /* harmony import */ var _saga_utils__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./saga.utils */ "../../dist/@frontegg/redux-store/auth/LoginState/saga.utils.js");
5916
5917
  /* harmony import */ var _sagas__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./sagas/afterAuthNavigation.saga */ "../../dist/@frontegg/redux-store/auth/LoginState/sagas/afterAuthNavigation.saga.js");
@@ -6269,30 +6270,29 @@ function* requestAuthorize({
6269
6270
  payload: firstTime
6270
6271
  }) {
6271
6272
  const calls = [];
6272
- const isCustomLoginEnabled = yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_2__.call)(_CustomLoginState_saga__WEBPACK_IMPORTED_MODULE_12__.customLoginEnabled);
6273
- if (isCustomLoginEnabled) {
6274
- /*
6275
- // waiting for refreshToken to be loaded is only necessary for custom login
6276
- // but doing this will degrade the loading performance in around 500 ms
6277
- // so we will wait for the refreshToken only if there is tenantResolver
6278
- */
6279
- yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_2__.call)(refreshToken);
6280
- } else {
6281
- calls.push((0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_2__.call)(refreshToken));
6282
- }
6273
+ const callsAfterRefresh = [];
6274
+ calls.push((0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_2__.call)(refreshToken));
6283
6275
  if (firstTime) {
6284
6276
  yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_2__.put)(_reducer__WEBPACK_IMPORTED_MODULE_5__.actions.setState({
6285
6277
  isLoading: true
6286
6278
  }));
6287
6279
  yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_2__.put)(_reducer__WEBPACK_IMPORTED_MODULE_5__.actions.loadSocialLoginsConfigurationV2());
6288
- calls.push((0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_2__.call)(_SignUp_saga__WEBPACK_IMPORTED_MODULE_13__.loadAllowSignUps));
6289
- calls.push((0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_2__.call)(_Security_SecurityPolicyState_saga__WEBPACK_IMPORTED_MODULE_14__.loadPublicAuthStrategiesPolicy));
6280
+ calls.push((0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_2__.call)(_SignUp_saga__WEBPACK_IMPORTED_MODULE_12__.loadAllowSignUps));
6281
+ calls.push((0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_2__.call)(_Security_SecurityPolicyState_saga__WEBPACK_IMPORTED_MODULE_13__.loadPublicAuthStrategiesPolicy));
6290
6282
  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));
6283
+ calls.push((0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_2__.call)(_vendor_saga__WEBPACK_IMPORTED_MODULE_14__.loadVendorPublicInfo));
6292
6284
  calls.push((0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_2__.call)(refreshMetadata));
6293
- calls.push((0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_2__.call)(_CustomLoginState_saga__WEBPACK_IMPORTED_MODULE_12__.loadCustomLoginRoutes));
6285
+ /*
6286
+ We will load custom login routes only if custom login is enabled
6287
+ In order to check if custom login is enabled without the tenant alias (search-param/sub-domain)
6288
+ we have to wait for the user state (refreshToken request)
6289
+ */
6290
+ callsAfterRefresh.push((0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_2__.call)(_CustomLoginState_saga__WEBPACK_IMPORTED_MODULE_15__.loadCustomLoginRoutes));
6294
6291
  }
6295
6292
  yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_2__.all)(calls);
6293
+ if (callsAfterRefresh.length > 0) {
6294
+ yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_2__.all)(callsAfterRefresh);
6295
+ }
6296
6296
  yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_2__.put)(_reducer__WEBPACK_IMPORTED_MODULE_5__.actions.setState({
6297
6297
  isLoading: false
6298
6298
  }));
@@ -6325,12 +6325,12 @@ function* requestAuthorizeSSR({
6325
6325
  }) {
6326
6326
  const calls = [];
6327
6327
  yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_2__.put)(_reducer__WEBPACK_IMPORTED_MODULE_5__.actions.loadSocialLoginsConfigurationV2());
6328
- calls.push((0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_2__.call)(_SignUp_saga__WEBPACK_IMPORTED_MODULE_13__.loadAllowSignUps));
6328
+ calls.push((0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_2__.call)(_SignUp_saga__WEBPACK_IMPORTED_MODULE_12__.loadAllowSignUps));
6329
6329
  calls.push((0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_2__.call)(loadSSOPublicConfigurationFunction));
6330
- calls.push((0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_2__.call)(_vendor_saga__WEBPACK_IMPORTED_MODULE_15__.loadVendorPublicInfo));
6330
+ calls.push((0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_2__.call)(_vendor_saga__WEBPACK_IMPORTED_MODULE_14__.loadVendorPublicInfo));
6331
6331
  calls.push((0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_2__.call)(refreshMetadata));
6332
6332
  calls.push((0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_2__.call)(isMFARequiredSSR, payload));
6333
- calls.push((0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_2__.call)(_CustomLoginState_saga__WEBPACK_IMPORTED_MODULE_12__.loadCustomLoginRoutes));
6333
+ calls.push((0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_2__.call)(_CustomLoginState_saga__WEBPACK_IMPORTED_MODULE_15__.loadCustomLoginRoutes));
6334
6334
  yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_2__.all)(calls);
6335
6335
  }
6336
6336
  const getUri = urlStrategy => {
@@ -6458,7 +6458,7 @@ function* requestHostedLoginAuthorize(additionalParams) {
6458
6458
  // We are saving the verifier in session storage to be able to validate the response
6459
6459
  localStorage.setItem(_constants__WEBPACK_IMPORTED_MODULE_17__.HOSTED_LOGIN_VERIFIER_KEY, code_verifier);
6460
6460
  let redirectUrl = `${window.location.origin}${urlStrategy === 'path' ? '' : '#'}${routes.hostedLoginRedirectUrl}`;
6461
- yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_2__.call)(_CustomLoginState_saga__WEBPACK_IMPORTED_MODULE_12__.loadCustomLoginRoutes);
6461
+ yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_2__.call)(_CustomLoginState_saga__WEBPACK_IMPORTED_MODULE_15__.loadCustomLoginRoutes);
6462
6462
  const customLoginSearchParam = yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_2__.select)(state => {
6463
6463
  var _state$auth$customLog;
6464
6464
  return (_state$auth$customLog = state.auth.customLoginState) == null ? void 0 : _state$auth$customLog.customLoginSearchParams;
@@ -6511,7 +6511,7 @@ function* handleHostedLoginCallback({
6511
6511
  urlStrategy: state.root.urlStrategy
6512
6512
  }));
6513
6513
  let redirectUrl = `${window.location.origin}${urlStrategy === 'path' ? '' : '#'}${routes.hostedLoginRedirectUrl}`;
6514
- yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_2__.call)(_CustomLoginState_saga__WEBPACK_IMPORTED_MODULE_12__.loadCustomLoginRoutes);
6514
+ yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_2__.call)(_CustomLoginState_saga__WEBPACK_IMPORTED_MODULE_15__.loadCustomLoginRoutes);
6515
6515
  const customLoginSearchParam = yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_2__.select)(state => {
6516
6516
  var _state$auth$customLog2;
6517
6517
  return (_state$auth$customLog2 = state.auth.customLoginState) == null ? void 0 : _state$auth$customLog2.customLoginSearchParams;
@@ -16731,7 +16731,6 @@ __webpack_require__.r(__webpack_exports__);
16731
16731
  /**
16732
16732
  * Step up for hosted login apps
16733
16733
  * @param payload.maxAge
16734
- * @param payload.callback
16735
16734
  */
16736
16735
  function* stepUpHostedLogin({
16737
16736
  payload
@@ -24700,7 +24699,7 @@ __webpack_require__.r(__webpack_exports__);
24700
24699
  /* harmony export */ });
24701
24700
  /* harmony import */ var _ThemeOptions__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ThemeOptions */ "../../dist/@frontegg/types/ThemeOptions/index.js");
24702
24701
  /* harmony import */ var _Metadata__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Metadata */ "../../dist/@frontegg/types/Metadata/index.js");
24703
- /** @license Frontegg v6.165.0-alpha.4
24702
+ /** @license Frontegg v6.165.0-alpha.6
24704
24703
  *
24705
24704
  * This source code is licensed under the MIT license found in the
24706
24705
  * LICENSE file in the root directory of this source tree.