@frontegg/js 6.166.0-alpha.0 → 6.166.0-alpha.2

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.166.0-alpha.0
1
+ /** @license Frontegg v6.166.0-alpha.2
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.166.0-alpha.0
1
+ /** @license Frontegg v6.166.0-alpha.2
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.166.0-alpha.0'
8
+ cdnVersion: '6.166.0-alpha.2'
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.166.0-alpha.0",
3
+ "version": "6.166.0-alpha.2",
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.166.0-alpha.0"
9
+ "@frontegg/types": "6.166.0-alpha.2"
10
10
  },
11
11
  "browserslist": {
12
12
  "production": [
@@ -1453,7 +1453,7 @@ __webpack_require__.r(__webpack_exports__);
1453
1453
  /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
1454
1454
  /* harmony export */ });
1455
1455
  /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
1456
- cdnVersion: '6.166.0-alpha.0'
1456
+ cdnVersion: '6.166.0-alpha.2'
1457
1457
  });
1458
1458
 
1459
1459
  /***/ }),
@@ -16730,9 +16730,11 @@ __webpack_require__.r(__webpack_exports__);
16730
16730
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
16731
16731
  /* harmony export */ "stepUpHostedLogin": () => (/* binding */ stepUpHostedLogin)
16732
16732
  /* harmony export */ });
16733
- /* harmony import */ var _LoginState_saga__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../LoginState/saga */ "../../dist/@frontegg/redux-store/auth/LoginState/saga.js");
16734
- /* harmony import */ var _consts__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./consts */ "../../dist/@frontegg/redux-store/auth/StepUpState/consts.js");
16735
- /* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./utils */ "../../dist/@frontegg/redux-store/auth/StepUpState/utils.js");
16733
+ /* harmony import */ var _LoginState_saga__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../LoginState/saga */ "../../dist/@frontegg/redux-store/auth/LoginState/saga.js");
16734
+ /* harmony import */ var _consts__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./consts */ "../../dist/@frontegg/redux-store/auth/StepUpState/consts.js");
16735
+ /* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./utils */ "../../dist/@frontegg/redux-store/auth/StepUpState/utils.js");
16736
+ /* harmony import */ var redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! redux-saga/effects */ "../../node_modules/redux-saga/dist/redux-saga-effects-npm-proxy.esm.js");
16737
+
16736
16738
 
16737
16739
 
16738
16740
 
@@ -16745,7 +16747,7 @@ function* stepUpHostedLogin({
16745
16747
  payload
16746
16748
  }) {
16747
16749
  const params = {
16748
- acr_values: _consts__WEBPACK_IMPORTED_MODULE_0__.ACR_VALUE
16750
+ acr_values: _consts__WEBPACK_IMPORTED_MODULE_1__.ACR_VALUE
16749
16751
  };
16750
16752
  const {
16751
16753
  maxAge
@@ -16753,9 +16755,18 @@ function* stepUpHostedLogin({
16753
16755
  if (maxAge !== undefined) {
16754
16756
  params.max_age = maxAge.toString();
16755
16757
  }
16756
- (0,_utils__WEBPACK_IMPORTED_MODULE_1__.setAfterAuthRedirectUrlForStepUp)();
16757
- window.localStorage.setItem(_consts__WEBPACK_IMPORTED_MODULE_0__.SHOULD_STEP_UP_KEY, 'true');
16758
- yield (0,_LoginState_saga__WEBPACK_IMPORTED_MODULE_2__.requestHostedLoginAuthorize)(params);
16758
+ const alias = yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.select)(({
16759
+ auth
16760
+ }) => {
16761
+ var _auth$tenantsState, _auth$tenantsState$ac;
16762
+ return (_auth$tenantsState = auth.tenantsState) == null ? void 0 : (_auth$tenantsState$ac = _auth$tenantsState.activeTenant) == null ? void 0 : _auth$tenantsState$ac.alias;
16763
+ });
16764
+ if (alias) {
16765
+ params.organization = alias;
16766
+ }
16767
+ (0,_utils__WEBPACK_IMPORTED_MODULE_2__.setAfterAuthRedirectUrlForStepUp)();
16768
+ window.localStorage.setItem(_consts__WEBPACK_IMPORTED_MODULE_1__.SHOULD_STEP_UP_KEY, 'true');
16769
+ yield (0,_LoginState_saga__WEBPACK_IMPORTED_MODULE_3__.requestHostedLoginAuthorize)(params);
16759
16770
  }
16760
16771
 
16761
16772
  /***/ }),
@@ -16821,8 +16832,11 @@ function setAfterAuthRedirectUrlForStepUp() {
16821
16832
  */
16822
16833
  const redirectByStepUpUrl = (stepUpUrl, onRedirectTo, maxAge) => {
16823
16834
  setAfterAuthRedirectUrlForStepUp();
16824
- const maxAgePart = maxAge !== undefined ? `?${_consts__WEBPACK_IMPORTED_MODULE_0__.STEP_UP_MAX_AGE_PARAM_NAME}=${maxAge}` : '';
16825
- onRedirectTo(`${stepUpUrl}${maxAgePart}`, {
16835
+ const searchParams = new URLSearchParams(window.location.search);
16836
+ if (maxAge) {
16837
+ searchParams.set(_consts__WEBPACK_IMPORTED_MODULE_0__.STEP_UP_MAX_AGE_PARAM_NAME, maxAge.toString());
16838
+ }
16839
+ onRedirectTo(`${stepUpUrl}${searchParams ? `?${searchParams}` : ''}`, {
16826
16840
  refresh: false
16827
16841
  });
16828
16842
  };
@@ -24710,7 +24724,7 @@ __webpack_require__.r(__webpack_exports__);
24710
24724
  /* harmony export */ });
24711
24725
  /* harmony import */ var _ThemeOptions__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ThemeOptions */ "../../dist/@frontegg/types/ThemeOptions/index.js");
24712
24726
  /* harmony import */ var _Metadata__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Metadata */ "../../dist/@frontegg/types/Metadata/index.js");
24713
- /** @license Frontegg v6.166.0-alpha.0
24727
+ /** @license Frontegg v6.166.0-alpha.2
24714
24728
  *
24715
24729
  * This source code is licensed under the MIT license found in the
24716
24730
  * LICENSE file in the root directory of this source tree.