@frontegg/js 6.165.0-alpha.8 → 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.
@@ -1,4 +1,4 @@
1
- import { EnhancedStore, EntitledToOptions, Entitlement, StepUpOptions, IsSteppedUpOptions } from '@frontegg/redux-store';
1
+ import { EnhancedStore, EntitledToOptions, Entitlement } from '@frontegg/redux-store';
2
2
  import { FronteggAppOptions, FronteggCheckoutDialogOptions, LocalizationsOverrides, LoadEntitlementsCallback } from '@frontegg/types';
3
3
  import { IFeatureFlagsAttributes } from '@frontegg/rest-api';
4
4
  import { CustomAttributes } from '@frontegg/entitlements-javascript-commons';
@@ -107,16 +107,6 @@ export declare class FronteggApp {
107
107
  * @param callback called on request completed with true if succeeded, false if failed
108
108
  */
109
109
  loadEntitlements(callback?: LoadEntitlementsCallback): void;
110
- /**
111
- * Redirects to the step up page with the max age param and set the redirect url in the local storage
112
- * @param options.maxAge optional max age
113
- */
114
- stepUp(options?: StepUpOptions): void;
115
- /**
116
- * @param options.maxAge optional max age
117
- * @return true when user is stepped up, false otherwise
118
- */
119
- isSteppedUp(options?: IsSteppedUpOptions): boolean;
120
110
  close(): void;
121
111
  }
122
112
  export {};
@@ -4,7 +4,7 @@ import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
4
4
  import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
5
5
  import _createClass from "@babel/runtime/helpers/esm/createClass";
6
6
  import _regeneratorRuntime from "@babel/runtime/regenerator";
7
- import { createFronteggStore, getPermissionEntitlements as _getPermissionEntitlements, getFeatureEntitlements as _getFeatureEntitlements, redirectByStepUpUrl, isSteppedUp as _isSteppedUp } from '@frontegg/redux-store';
7
+ import { createFronteggStore, getPermissionEntitlements as _getPermissionEntitlements, getFeatureEntitlements as _getFeatureEntitlements } from '@frontegg/redux-store';
8
8
  import { Metadata } from '@frontegg/types';
9
9
  import { formatName, restoreSearchParams } from '../utils';
10
10
  import { AppHolder } from '../AppHolder';
@@ -549,41 +549,6 @@ export var FronteggApp = /*#__PURE__*/function () {
549
549
  }
550
550
  });
551
551
  }
552
-
553
- /**
554
- * Redirects to the step up page with the max age param and set the redirect url in the local storage
555
- * @param options.maxAge optional max age
556
- */
557
- }, {
558
- key: "stepUp",
559
- value: function stepUp(options) {
560
- var state = this.store.getState();
561
- var _ref4 = (state == null ? void 0 : state.auth) || {},
562
- hostedLoginBox = _ref4.hostedLoginBox,
563
- stepUpUrl = _ref4.routes.stepUpUrl;
564
- if (hostedLoginBox) {
565
- this.store.dispatch({
566
- type: 'auth/stepUpHostedLogin',
567
- payload: options
568
- });
569
- return;
570
- }
571
- redirectByStepUpUrl(stepUpUrl, state.auth.onRedirectTo, options == null ? void 0 : options.maxAge);
572
- }
573
-
574
- /**
575
- * @param options.maxAge optional max age
576
- * @return true when user is stepped up, false otherwise
577
- */
578
- }, {
579
- key: "isSteppedUp",
580
- value: function isSteppedUp() {
581
- var _this$store$getState;
582
- var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
583
- var _ref5 = ((_this$store$getState = this.store.getState()) == null ? void 0 : _this$store$getState.auth) || {},
584
- user = _ref5.user;
585
- return _isSteppedUp(user, options);
586
- }
587
552
  }, {
588
553
  key: "close",
589
554
  value: function close() {
package/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license Frontegg v6.165.0-alpha.8
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.
@@ -556,41 +556,6 @@ var FronteggApp = /*#__PURE__*/function () {
556
556
  }
557
557
  });
558
558
  }
559
-
560
- /**
561
- * Redirects to the step up page with the max age param and set the redirect url in the local storage
562
- * @param options.maxAge optional max age
563
- */
564
- }, {
565
- key: "stepUp",
566
- value: function stepUp(options) {
567
- var state = this.store.getState();
568
- var _ref4 = (state == null ? void 0 : state.auth) || {},
569
- hostedLoginBox = _ref4.hostedLoginBox,
570
- stepUpUrl = _ref4.routes.stepUpUrl;
571
- if (hostedLoginBox) {
572
- this.store.dispatch({
573
- type: 'auth/stepUpHostedLogin',
574
- payload: options
575
- });
576
- return;
577
- }
578
- (0, _reduxStore.redirectByStepUpUrl)(stepUpUrl, state.auth.onRedirectTo, options == null ? void 0 : options.maxAge);
579
- }
580
-
581
- /**
582
- * @param options.maxAge optional max age
583
- * @return true when user is stepped up, false otherwise
584
- */
585
- }, {
586
- key: "isSteppedUp",
587
- value: function isSteppedUp() {
588
- var _this$store$getState;
589
- var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
590
- var _ref5 = ((_this$store$getState = this.store.getState()) == null ? void 0 : _this$store$getState.auth) || {},
591
- user = _ref5.user;
592
- return (0, _reduxStore.isSteppedUp)(user, options);
593
- }
594
559
  }, {
595
560
  key: "close",
596
561
  value: function close() {
package/node/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license Frontegg v6.165.0-alpha.8
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.8'
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.8",
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.8"
9
+ "@frontegg/types": "6.165.0"
10
10
  },
11
11
  "browserslist": {
12
12
  "production": [
@@ -303,7 +303,6 @@ __webpack_require__.r(__webpack_exports__);
303
303
  /* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_5__);
304
304
  /* harmony import */ var _frontegg_redux_store__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! @frontegg/redux-store */ "../../dist/@frontegg/redux-store/toolkit/index.js");
305
305
  /* harmony import */ var _frontegg_redux_store__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! @frontegg/redux-store */ "../../dist/@frontegg/redux-store/auth/Entitlements/utils.js");
306
- /* harmony import */ var _frontegg_redux_store__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! @frontegg/redux-store */ "../../dist/@frontegg/redux-store/auth/StepUpState/utils.js");
307
306
  /* harmony import */ var _frontegg_types__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @frontegg/types */ "../../dist/@frontegg/types/Metadata/index.js");
308
307
  /* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../utils */ "../../dist/@frontegg/js/utils/index.js");
309
308
  /* harmony import */ var _AppHolder__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../AppHolder */ "../../dist/@frontegg/js/AppHolder/index.js");
@@ -870,41 +869,6 @@ var FronteggApp = /*#__PURE__*/function () {
870
869
  }
871
870
  });
872
871
  }
873
-
874
- /**
875
- * Redirects to the step up page with the max age param and set the redirect url in the local storage
876
- * @param options.maxAge optional max age
877
- */
878
- }, {
879
- key: "stepUp",
880
- value: function stepUp(options) {
881
- var state = this.store.getState();
882
- var _ref4 = (state == null ? void 0 : state.auth) || {},
883
- hostedLoginBox = _ref4.hostedLoginBox,
884
- stepUpUrl = _ref4.routes.stepUpUrl;
885
- if (hostedLoginBox) {
886
- this.store.dispatch({
887
- type: 'auth/stepUpHostedLogin',
888
- payload: options
889
- });
890
- return;
891
- }
892
- (0,_frontegg_redux_store__WEBPACK_IMPORTED_MODULE_21__.redirectByStepUpUrl)(stepUpUrl, state.auth.onRedirectTo, options == null ? void 0 : options.maxAge);
893
- }
894
-
895
- /**
896
- * @param options.maxAge optional max age
897
- * @return true when user is stepped up, false otherwise
898
- */
899
- }, {
900
- key: "isSteppedUp",
901
- value: function isSteppedUp() {
902
- var _this$store$getState;
903
- var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
904
- var _ref5 = ((_this$store$getState = this.store.getState()) == null ? void 0 : _this$store$getState.auth) || {},
905
- user = _ref5.user;
906
- return (0,_frontegg_redux_store__WEBPACK_IMPORTED_MODULE_21__.isSteppedUp)(user, options);
907
- }
908
872
  }, {
909
873
  key: "close",
910
874
  value: function close() {
@@ -1453,7 +1417,7 @@ __webpack_require__.r(__webpack_exports__);
1453
1417
  /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
1454
1418
  /* harmony export */ });
1455
1419
  /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
1456
- cdnVersion: '6.165.0-alpha.8'
1420
+ cdnVersion: '6.165.0'
1457
1421
  });
1458
1422
 
1459
1423
  /***/ }),
@@ -5650,7 +5614,6 @@ const defaultFronteggRoutes = {
5650
5614
  "use strict";
5651
5615
  __webpack_require__.r(__webpack_exports__);
5652
5616
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
5653
- /* harmony export */ "defaultFronteggRoutes": () => (/* reexport safe */ _consts__WEBPACK_IMPORTED_MODULE_5__.defaultFronteggRoutes),
5654
5617
  /* harmony export */ "getRedirectUrl": () => (/* reexport safe */ _utils__WEBPACK_IMPORTED_MODULE_4__.getRedirectUrl),
5655
5618
  /* harmony export */ "getSearchParam": () => (/* reexport safe */ _utils__WEBPACK_IMPORTED_MODULE_4__.getSearchParam),
5656
5619
  /* harmony export */ "loginActions": () => (/* binding */ actions),
@@ -5662,7 +5625,6 @@ __webpack_require__.r(__webpack_exports__);
5662
5625
  /* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils */ "../../dist/@frontegg/redux-store/auth/utils.js");
5663
5626
  /* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../constants */ "../../dist/@frontegg/redux-store/constants.js");
5664
5627
  /* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./utils */ "../../dist/@frontegg/redux-store/auth/LoginState/utils.js");
5665
- /* harmony import */ var _consts__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./consts */ "../../dist/@frontegg/redux-store/auth/LoginState/consts.js");
5666
5628
 
5667
5629
 
5668
5630
 
@@ -5806,7 +5768,6 @@ const Matcher = {};
5806
5768
 
5807
5769
 
5808
5770
 
5809
-
5810
5771
  /***/ }),
5811
5772
 
5812
5773
  /***/ "../../dist/@frontegg/redux-store/auth/LoginState/interfaces.js":
@@ -5882,8 +5843,7 @@ __webpack_require__.r(__webpack_exports__);
5882
5843
  /* harmony export */ "mfaWithAuthenticator": () => (/* reexport safe */ _sagas__WEBPACK_IMPORTED_MODULE_29__.mfaWithAuthenticator),
5883
5844
  /* harmony export */ "refreshMetadata": () => (/* binding */ refreshMetadata),
5884
5845
  /* harmony export */ "refreshToken": () => (/* binding */ refreshToken),
5885
- /* harmony export */ "refreshTokenForSocialLogins": () => (/* binding */ refreshTokenForSocialLogins),
5886
- /* harmony export */ "requestHostedLoginAuthorize": () => (/* binding */ requestHostedLoginAuthorize)
5846
+ /* harmony export */ "refreshTokenForSocialLogins": () => (/* binding */ refreshTokenForSocialLogins)
5887
5847
  /* harmony export */ });
5888
5848
  /* harmony import */ var _babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutPropertiesLoose */ "../../node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js");
5889
5849
  /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "../../node_modules/@babel/runtime/helpers/esm/extends.js");
@@ -16335,8 +16295,7 @@ __webpack_require__.r(__webpack_exports__);
16335
16295
  /* harmony export */ "ACR_VALUE": () => (/* binding */ ACR_VALUE),
16336
16296
  /* harmony export */ "AMR_ADDITIONAL_VALUE": () => (/* binding */ AMR_ADDITIONAL_VALUE),
16337
16297
  /* harmony export */ "AMR_MFA_VALUE": () => (/* binding */ AMR_MFA_VALUE),
16338
- /* harmony export */ "SHOULD_STEP_UP_KEY": () => (/* binding */ SHOULD_STEP_UP_KEY),
16339
- /* harmony export */ "STEP_UP_MAX_AGE_PARAM_NAME": () => (/* binding */ STEP_UP_MAX_AGE_PARAM_NAME)
16298
+ /* harmony export */ "SHOULD_STEP_UP_KEY": () => (/* binding */ SHOULD_STEP_UP_KEY)
16340
16299
  /* harmony export */ });
16341
16300
  /**
16342
16301
  * The required ACR (Authorization Context Reference) value for the step up flow
@@ -16359,11 +16318,6 @@ const AMR_ADDITIONAL_VALUE = ['otp', 'sms', 'hwk'];
16359
16318
  */
16360
16319
  const SHOULD_STEP_UP_KEY = 'SHOULD_STEP_UP';
16361
16320
 
16362
- /**
16363
- * The name of the query param that contains the max age of the step up
16364
- */
16365
- const STEP_UP_MAX_AGE_PARAM_NAME = 'maxAge';
16366
-
16367
16321
  /***/ }),
16368
16322
 
16369
16323
  /***/ "../../dist/@frontegg/redux-store/auth/StepUpState/generateStepUpSession.saga.js":
@@ -16501,10 +16455,7 @@ function* generateStepUpSession({
16501
16455
  "use strict";
16502
16456
  __webpack_require__.r(__webpack_exports__);
16503
16457
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
16504
- /* harmony export */ "STEP_UP_MAX_AGE_PARAM_NAME": () => (/* reexport safe */ _consts__WEBPACK_IMPORTED_MODULE_4__.STEP_UP_MAX_AGE_PARAM_NAME),
16505
16458
  /* harmony export */ "isSteppedUp": () => (/* reexport safe */ _utils__WEBPACK_IMPORTED_MODULE_3__.isSteppedUp),
16506
- /* harmony export */ "redirectByStepUpUrl": () => (/* reexport safe */ _utils__WEBPACK_IMPORTED_MODULE_3__.redirectByStepUpUrl),
16507
- /* harmony export */ "setAfterAuthRedirectUrlForStepUp": () => (/* reexport safe */ _utils__WEBPACK_IMPORTED_MODULE_3__.setAfterAuthRedirectUrlForStepUp),
16508
16459
  /* harmony export */ "stepUpActions": () => (/* binding */ actions),
16509
16460
  /* harmony export */ "stepUpReducers": () => (/* binding */ reducers),
16510
16461
  /* harmony export */ "stepUpState": () => (/* binding */ stepUpState)
@@ -16513,7 +16464,6 @@ __webpack_require__.r(__webpack_exports__);
16513
16464
  /* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils */ "../../dist/@frontegg/redux-store/auth/utils.js");
16514
16465
  /* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../constants */ "../../dist/@frontegg/redux-store/constants.js");
16515
16466
  /* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./utils */ "../../dist/@frontegg/redux-store/auth/StepUpState/utils.js");
16516
- /* harmony import */ var _consts__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./consts */ "../../dist/@frontegg/redux-store/auth/StepUpState/consts.js");
16517
16467
 
16518
16468
 
16519
16469
 
@@ -16529,9 +16479,6 @@ const reducers = {
16529
16479
  })
16530
16480
  };
16531
16481
  const actions = {
16532
- stepUpHostedLogin: (0,_reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_1__.createAction)(`${_constants__WEBPACK_IMPORTED_MODULE_2__.authStoreName}/stepUpHostedLogin`, payload => ({
16533
- payload
16534
- })),
16535
16482
  generateStepUpSession: (0,_reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_1__.createAction)(`${_constants__WEBPACK_IMPORTED_MODULE_2__.authStoreName}/generateStepUpSession`, payload => ({
16536
16483
  payload
16537
16484
  })),
@@ -16572,7 +16519,6 @@ const Matcher = {};
16572
16519
 
16573
16520
 
16574
16521
 
16575
-
16576
16522
  /***/ }),
16577
16523
 
16578
16524
  /***/ "../../dist/@frontegg/redux-store/auth/StepUpState/saga.js":
@@ -16599,9 +16545,7 @@ __webpack_require__.r(__webpack_exports__);
16599
16545
  /* harmony import */ var _LoginState_sagas_mfaWithSMS_saga__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../LoginState/sagas/mfaWithSMS.saga */ "../../dist/@frontegg/redux-store/auth/LoginState/sagas/mfaWithSMS.saga.js");
16600
16546
  /* harmony import */ var _LoginState_sagas_mfaWithWebAuthn_saga__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../LoginState/sagas/mfaWithWebAuthn.saga */ "../../dist/@frontegg/redux-store/auth/LoginState/sagas/mfaWithWebAuthn.saga.js");
16601
16547
  /* harmony import */ var _LoginState_sagas_mfaWithEmailCode_saga__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../LoginState/sagas/mfaWithEmailCode.saga */ "../../dist/@frontegg/redux-store/auth/LoginState/sagas/mfaWithEmailCode.saga.js");
16602
- /* harmony import */ var _generateStepUpSession_saga__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./generateStepUpSession.saga */ "../../dist/@frontegg/redux-store/auth/StepUpState/generateStepUpSession.saga.js");
16603
- /* harmony import */ var _stepUpHostedLogin_saga__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./stepUpHostedLogin.saga */ "../../dist/@frontegg/redux-store/auth/StepUpState/stepUpHostedLogin.saga.js");
16604
-
16548
+ /* harmony import */ var _generateStepUpSession_saga__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./generateStepUpSession.saga */ "../../dist/@frontegg/redux-store/auth/StepUpState/generateStepUpSession.saga.js");
16605
16549
 
16606
16550
 
16607
16551
 
@@ -16697,8 +16641,7 @@ function* preVerifyMFAEmailCodeForStepUp({
16697
16641
  yield (0,_LoginState_sagas_mfaWithEmailCode_saga__WEBPACK_IMPORTED_MODULE_5__.preVerifyMFAEmailCode)(payload, _reducer__WEBPACK_IMPORTED_MODULE_2__.actions.setStepUpState);
16698
16642
  }
16699
16643
  function* stepUpSagas() {
16700
- yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.takeLeading)(_reducer__WEBPACK_IMPORTED_MODULE_2__.actions.stepUpHostedLogin, _stepUpHostedLogin_saga__WEBPACK_IMPORTED_MODULE_6__.stepUpHostedLogin);
16701
- yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.takeLeading)(_reducer__WEBPACK_IMPORTED_MODULE_2__.actions.generateStepUpSession, _generateStepUpSession_saga__WEBPACK_IMPORTED_MODULE_7__.generateStepUpSession);
16644
+ yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.takeLeading)(_reducer__WEBPACK_IMPORTED_MODULE_2__.actions.generateStepUpSession, _generateStepUpSession_saga__WEBPACK_IMPORTED_MODULE_6__.generateStepUpSession);
16702
16645
  yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.takeLeading)(_reducer__WEBPACK_IMPORTED_MODULE_2__.actions.stepUpWithAuthenticator, stepUpWithAuthenticator);
16703
16646
  yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.takeLeading)(_reducer__WEBPACK_IMPORTED_MODULE_2__.actions.preVerifyMFASMSForStepUp, preVerifyMFASMSForStepUp);
16704
16647
  yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.takeLeading)(_reducer__WEBPACK_IMPORTED_MODULE_2__.actions.verifyMFASMSForStepUp, verifyMFASMSForStepUp);
@@ -16710,46 +16653,6 @@ function* stepUpSagas() {
16710
16653
 
16711
16654
  /***/ }),
16712
16655
 
16713
- /***/ "../../dist/@frontegg/redux-store/auth/StepUpState/stepUpHostedLogin.saga.js":
16714
- /*!***********************************************************************************!*\
16715
- !*** ../../dist/@frontegg/redux-store/auth/StepUpState/stepUpHostedLogin.saga.js ***!
16716
- \***********************************************************************************/
16717
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
16718
-
16719
- "use strict";
16720
- __webpack_require__.r(__webpack_exports__);
16721
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
16722
- /* harmony export */ "stepUpHostedLogin": () => (/* binding */ stepUpHostedLogin)
16723
- /* harmony export */ });
16724
- /* harmony import */ var _LoginState_saga__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../LoginState/saga */ "../../dist/@frontegg/redux-store/auth/LoginState/saga.js");
16725
- /* harmony import */ var _consts__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./consts */ "../../dist/@frontegg/redux-store/auth/StepUpState/consts.js");
16726
- /* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./utils */ "../../dist/@frontegg/redux-store/auth/StepUpState/utils.js");
16727
-
16728
-
16729
-
16730
-
16731
- /**
16732
- * Step up for hosted login apps
16733
- * @param payload.maxAge
16734
- */
16735
- function* stepUpHostedLogin({
16736
- payload
16737
- }) {
16738
- const params = {
16739
- acr_values: _consts__WEBPACK_IMPORTED_MODULE_0__.ACR_VALUE
16740
- };
16741
- const {
16742
- maxAge
16743
- } = payload || {};
16744
- if (maxAge !== undefined) {
16745
- params.max_age = maxAge.toString();
16746
- }
16747
- (0,_utils__WEBPACK_IMPORTED_MODULE_1__.setAfterAuthRedirectUrlForStepUp)();
16748
- yield (0,_LoginState_saga__WEBPACK_IMPORTED_MODULE_2__.requestHostedLoginAuthorize)(params);
16749
- }
16750
-
16751
- /***/ }),
16752
-
16753
16656
  /***/ "../../dist/@frontegg/redux-store/auth/StepUpState/utils.js":
16754
16657
  /*!******************************************************************!*\
16755
16658
  !*** ../../dist/@frontegg/redux-store/auth/StepUpState/utils.js ***!
@@ -16759,14 +16662,10 @@ function* stepUpHostedLogin({
16759
16662
  "use strict";
16760
16663
  __webpack_require__.r(__webpack_exports__);
16761
16664
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
16762
- /* harmony export */ "isSteppedUp": () => (/* binding */ isSteppedUp),
16763
- /* harmony export */ "redirectByStepUpUrl": () => (/* binding */ redirectByStepUpUrl),
16764
- /* harmony export */ "setAfterAuthRedirectUrlForStepUp": () => (/* binding */ setAfterAuthRedirectUrlForStepUp)
16665
+ /* harmony export */ "isSteppedUp": () => (/* binding */ isSteppedUp)
16765
16666
  /* harmony export */ });
16766
- /* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../constants */ "../../dist/@frontegg/redux-store/constants.js");
16767
16667
  /* harmony import */ var _consts__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./consts */ "../../dist/@frontegg/redux-store/auth/StepUpState/consts.js");
16768
16668
 
16769
-
16770
16669
  /**
16771
16670
  * @param options.amr
16772
16671
  * @param options.acr
@@ -16774,15 +16673,12 @@ __webpack_require__.r(__webpack_exports__);
16774
16673
  * @param options.maxAge - max age of step up
16775
16674
  * @returns true when the user is stepped up, false otherwise
16776
16675
  */
16777
- const isSteppedUp = (user, {
16676
+ const isSteppedUp = ({
16677
+ amr = [],
16678
+ acr = '',
16679
+ auth_time,
16778
16680
  maxAge
16779
16681
  } = {}) => {
16780
- if (!user) return false;
16781
- const {
16782
- amr = [],
16783
- acr = '',
16784
- auth_time
16785
- } = user;
16786
16682
  if (maxAge && auth_time) {
16787
16683
  // when user is logged in for a long time (more than maxAge, but jwt is still valid because it's not refreshed yet)
16788
16684
  const isMaxAgeValid = Date.now() / 1000 - auth_time <= maxAge;
@@ -16794,29 +16690,6 @@ const isSteppedUp = (user, {
16794
16690
  return isACRValid && isAMRIncludesMFA && isAMRIncludesMethod;
16795
16691
  };
16796
16692
 
16797
- /**
16798
- * Set the url and query params in the local storage FRONTEGG_AFTER_AUTH_REDIRECT_URL value
16799
- */
16800
- function setAfterAuthRedirectUrlForStepUp() {
16801
- const encodedRedirectUrl = window.location.pathname + window.location.search;
16802
- window.localStorage.setItem(_constants__WEBPACK_IMPORTED_MODULE_1__.FRONTEGG_AFTER_AUTH_REDIRECT_URL, encodedRedirectUrl);
16803
- }
16804
-
16805
- /**
16806
- * Redirects to the step up url with the max age param and set the redirect url in the local storage
16807
- * The redirect url will be used after the step up flow is done
16808
- * @param stepUpUrl - step up url to redirect to
16809
- * @param onRedirectTo - redirect to function
16810
- * @param maxAge - max age of step up
16811
- */
16812
- const redirectByStepUpUrl = (stepUpUrl, onRedirectTo, maxAge) => {
16813
- setAfterAuthRedirectUrlForStepUp();
16814
- const maxAgePart = maxAge !== undefined ? `?${_consts__WEBPACK_IMPORTED_MODULE_0__.STEP_UP_MAX_AGE_PARAM_NAME}=${maxAge}` : '';
16815
- onRedirectTo(`${stepUpUrl}${maxAgePart}`, {
16816
- refresh: false
16817
- });
16818
- };
16819
-
16820
16693
  /***/ }),
16821
16694
 
16822
16695
  /***/ "../../dist/@frontegg/redux-store/auth/TeamState/index.js":
@@ -19349,7 +19222,6 @@ __webpack_require__.r(__webpack_exports__);
19349
19222
  /* harmony export */ "QuickLoginStrategy": () => (/* reexport safe */ _LoginState_interfaces__WEBPACK_IMPORTED_MODULE_1__.QuickLoginStrategy),
19350
19223
  /* harmony export */ "ResetPhoneNumberStep": () => (/* reexport safe */ _ResetPhoneNumberState_interfaces__WEBPACK_IMPORTED_MODULE_12__.ResetPhoneNumberStep),
19351
19224
  /* harmony export */ "SSOStateKeys": () => (/* reexport safe */ _SSOState_interfaces__WEBPACK_IMPORTED_MODULE_14__.SSOStateKeys),
19352
- /* harmony export */ "STEP_UP_MAX_AGE_PARAM_NAME": () => (/* reexport safe */ _StepUpState__WEBPACK_IMPORTED_MODULE_3__.STEP_UP_MAX_AGE_PARAM_NAME),
19353
19225
  /* harmony export */ "SamlVendors": () => (/* reexport safe */ _SSOState_interfaces__WEBPACK_IMPORTED_MODULE_14__.SamlVendors),
19354
19226
  /* harmony export */ "SecurityCenterStateKeys": () => (/* reexport safe */ _Security_SecurityCenterState_types__WEBPACK_IMPORTED_MODULE_41__.SecurityCenterStateKeys),
19355
19227
  /* harmony export */ "SignUpStage": () => (/* reexport safe */ _SignUp_interfaces__WEBPACK_IMPORTED_MODULE_25__.SignUpStage),
@@ -19384,7 +19256,6 @@ __webpack_require__.r(__webpack_exports__);
19384
19256
  /* harmony export */ "customLoginReducers": () => (/* reexport safe */ _CustomLoginState__WEBPACK_IMPORTED_MODULE_42__.customLoginReducers),
19385
19257
  /* harmony export */ "customLoginState": () => (/* reexport safe */ _CustomLoginState__WEBPACK_IMPORTED_MODULE_42__.customLoginState),
19386
19258
  /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__),
19387
- /* harmony export */ "defaultFronteggRoutes": () => (/* reexport safe */ _LoginState__WEBPACK_IMPORTED_MODULE_2__.defaultFronteggRoutes),
19388
19259
  /* harmony export */ "entitlementsSagas": () => (/* reexport safe */ _Entitlements__WEBPACK_IMPORTED_MODULE_37__.entitlementsSagas),
19389
19260
  /* harmony export */ "forgotPasswordActions": () => (/* reexport safe */ _ForgotPasswordState__WEBPACK_IMPORTED_MODULE_11__.forgotPasswordActions),
19390
19261
  /* harmony export */ "forgotPasswordReducers": () => (/* reexport safe */ _ForgotPasswordState__WEBPACK_IMPORTED_MODULE_11__.forgotPasswordReducers),
@@ -19423,7 +19294,6 @@ __webpack_require__.r(__webpack_exports__);
19423
19294
  /* harmony export */ "provisioningActions": () => (/* reexport safe */ _Provisioning__WEBPACK_IMPORTED_MODULE_36__.provisioningActions),
19424
19295
  /* harmony export */ "provisioningReducers": () => (/* reexport safe */ _Provisioning__WEBPACK_IMPORTED_MODULE_36__.provisioningReducers),
19425
19296
  /* harmony export */ "provisioningState": () => (/* reexport safe */ _Provisioning__WEBPACK_IMPORTED_MODULE_36__.provisioningState),
19426
- /* harmony export */ "redirectByStepUpUrl": () => (/* reexport safe */ _StepUpState__WEBPACK_IMPORTED_MODULE_3__.redirectByStepUpUrl),
19427
19297
  /* harmony export */ "resetPhoneNumberActions": () => (/* reexport safe */ _ResetPhoneNumberState__WEBPACK_IMPORTED_MODULE_13__.resetPhoneNumberActions),
19428
19298
  /* harmony export */ "resetPhoneNumberReducers": () => (/* reexport safe */ _ResetPhoneNumberState__WEBPACK_IMPORTED_MODULE_13__.resetPhoneNumberReducers),
19429
19299
  /* harmony export */ "resetPhoneNumberState": () => (/* reexport safe */ _ResetPhoneNumberState__WEBPACK_IMPORTED_MODULE_13__.resetPhoneNumberState),
@@ -19445,7 +19315,6 @@ __webpack_require__.r(__webpack_exports__);
19445
19315
  /* harmony export */ "sessionsPolicyState": () => (/* reexport safe */ _Security_SessionsPolicyState__WEBPACK_IMPORTED_MODULE_34__.sessionsPolicyState),
19446
19316
  /* harmony export */ "sessionsReducers": () => (/* reexport safe */ _SessionsState__WEBPACK_IMPORTED_MODULE_33__.sessionsReducers),
19447
19317
  /* harmony export */ "sessionsState": () => (/* reexport safe */ _SessionsState__WEBPACK_IMPORTED_MODULE_33__.sessionsState),
19448
- /* harmony export */ "setAfterAuthRedirectUrlForStepUp": () => (/* reexport safe */ _StepUpState__WEBPACK_IMPORTED_MODULE_3__.setAfterAuthRedirectUrlForStepUp),
19449
19318
  /* harmony export */ "signUpActions": () => (/* reexport safe */ _SignUp__WEBPACK_IMPORTED_MODULE_26__.signUpActions),
19450
19319
  /* harmony export */ "signUpReducers": () => (/* reexport safe */ _SignUp__WEBPACK_IMPORTED_MODULE_26__.signUpReducers),
19451
19320
  /* harmony export */ "signUpState": () => (/* reexport safe */ _SignUp__WEBPACK_IMPORTED_MODULE_26__.signUpState),
@@ -24699,7 +24568,7 @@ __webpack_require__.r(__webpack_exports__);
24699
24568
  /* harmony export */ });
24700
24569
  /* harmony import */ var _ThemeOptions__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ThemeOptions */ "../../dist/@frontegg/types/ThemeOptions/index.js");
24701
24570
  /* harmony import */ var _Metadata__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Metadata */ "../../dist/@frontegg/types/Metadata/index.js");
24702
- /** @license Frontegg v6.165.0-alpha.8
24571
+ /** @license Frontegg v6.165.0
24703
24572
  *
24704
24573
  * This source code is licensed under the MIT license found in the
24705
24574
  * LICENSE file in the root directory of this source tree.
@@ -28478,7 +28347,7 @@ __webpack_require__.r(__webpack_exports__);
28478
28347
  /* harmony import */ var _users_interfaces__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./users/interfaces */ "../../node_modules/@frontegg/rest-api/users/interfaces.js");
28479
28348
  /* harmony import */ var _entitlements_interfaces__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./entitlements/interfaces */ "../../node_modules/@frontegg/rest-api/entitlements/interfaces.js");
28480
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");
28481
- /** @license Frontegg v3.1.55
28350
+ /** @license Frontegg v3.1.56
28482
28351
  *
28483
28352
  * This source code is licensed under the MIT license found in the
28484
28353
  * LICENSE file in the root directory of this source tree.