@frontegg/js 7.128.0 → 7.129.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.
@@ -1934,7 +1934,7 @@ __webpack_require__.r(__webpack_exports__);
1934
1934
  /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
1935
1935
  /* harmony export */ });
1936
1936
  /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
1937
- cdnVersion: '7.128.0'
1937
+ cdnVersion: '7.129.0'
1938
1938
  });
1939
1939
 
1940
1940
  /***/ }),
@@ -5610,15 +5610,19 @@ __webpack_require__.r(__webpack_exports__);
5610
5610
  logoutUrl,
5611
5611
  socialLoginCallbackUrl,
5612
5612
  activateUrl,
5613
- activateWithOTCUrl
5613
+ activateWithOTCUrl,
5614
+ oidcRedirectUrl
5614
5615
  } = routes;
5615
5616
  let finalUrl = urlFromLocalStorage;
5616
5617
  if (!finalUrl || [loginUrl, logoutUrl, socialLoginCallbackUrl, activateUrl, activateWithOTCUrl].includes(finalUrl)) {
5617
5618
  finalUrl = authenticatedUrl;
5618
5619
  }
5620
+
5621
+ // The OIDC callback's query is the IdP's code and state; the user's own query was saved with the URL.
5622
+ const isOidcCallback = !!oidcRedirectUrl && window.location.pathname.endsWith(oidcRedirectUrl);
5619
5623
  const redirectUrl = (0,_helpers__WEBPACK_IMPORTED_MODULE_3__.getRedirectUrl)({
5620
5624
  authenticatedUrl: finalUrl,
5621
- includeQueryParam,
5625
+ includeQueryParam: includeQueryParam && !isOidcCallback,
5622
5626
  enforceRedirectToSameSite,
5623
5627
  allowedRedirectOrigins
5624
5628
  });
@@ -6291,31 +6295,31 @@ __webpack_require__.r(__webpack_exports__);
6291
6295
  /* harmony import */ var _mfaWithEmailCode_actions__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ./mfaWithEmailCode.actions */ "../../dist/@frontegg/redux-store/auth/LoginState/actions/mfaWithEmailCode.actions.js");
6292
6296
  /* harmony import */ var _mfaWithSMS_actions__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ./mfaWithSMS.actions */ "../../dist/@frontegg/redux-store/auth/LoginState/actions/mfaWithSMS.actions.js");
6293
6297
  /* harmony import */ var _mfaWithWebAuthn_actions__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ./mfaWithWebAuthn.actions */ "../../dist/@frontegg/redux-store/auth/LoginState/actions/mfaWithWebAuthn.actions.js");
6294
- /* harmony import */ var _interfaces__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../interfaces */ "../../dist/@frontegg/redux-store/auth/LoginState/interfaces.js");
6295
- /* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../helpers */ "../../dist/@frontegg/redux-store/helpers/refreshTokenRetry.js");
6296
- /* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../../helpers */ "../../dist/@frontegg/redux-store/helpers/common.js");
6297
- /* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../../helpers */ "../../dist/@frontegg/redux-store/helpers/handlers.js");
6298
- /* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../../../helpers */ "../../dist/@frontegg/redux-store/helpers/gtm.js");
6298
+ /* harmony import */ var _interfaces__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../interfaces */ "../../dist/@frontegg/redux-store/auth/LoginState/interfaces.js");
6299
+ /* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../helpers */ "../../dist/@frontegg/redux-store/helpers/refreshTokenRetry.js");
6300
+ /* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../../helpers */ "../../dist/@frontegg/redux-store/helpers/common.js");
6301
+ /* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../../helpers */ "../../dist/@frontegg/redux-store/helpers/handlers.js");
6302
+ /* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../../../helpers */ "../../dist/@frontegg/redux-store/helpers/gtm.js");
6299
6303
  /* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../../../helpers */ "../../dist/@frontegg/redux-store/helpers/encoders.js");
6300
6304
  /* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ../../../helpers */ "../../dist/@frontegg/redux-store/helpers/converters.js");
6301
- /* harmony import */ var _state__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../state */ "../../dist/@frontegg/redux-store/auth/LoginState/state.js");
6302
- /* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../helpers */ "../../dist/@frontegg/redux-store/auth/LoginState/helpers.js");
6303
- /* harmony import */ var _frontegg_rest_api__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @frontegg/rest-api */ "../../dist/@frontegg/rest-api/ContextHolder/index.js");
6304
- /* harmony import */ var _frontegg_rest_api__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @frontegg/rest-api */ "../../dist/@frontegg/rest-api/auth/utils.js");
6305
- /* harmony import */ var _frontegg_rest_api__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @frontegg/rest-api */ "../../dist/@frontegg/rest-api/feature-flags/index.js");
6306
- /* harmony import */ var _frontegg_rest_api__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! @frontegg/rest-api */ "../../dist/@frontegg/rest-api/auth/enums.js");
6307
- /* harmony import */ var _frontegg_rest_api__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! @frontegg/rest-api */ "../../dist/@frontegg/rest-api/auth/interfaces.js");
6305
+ /* harmony import */ var _state__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../state */ "../../dist/@frontegg/redux-store/auth/LoginState/state.js");
6306
+ /* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../helpers */ "../../dist/@frontegg/redux-store/auth/LoginState/helpers.js");
6307
+ /* harmony import */ var _frontegg_rest_api__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @frontegg/rest-api */ "../../dist/@frontegg/rest-api/ContextHolder/index.js");
6308
+ /* harmony import */ var _frontegg_rest_api__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @frontegg/rest-api */ "../../dist/@frontegg/rest-api/auth/utils.js");
6309
+ /* harmony import */ var _frontegg_rest_api__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @frontegg/rest-api */ "../../dist/@frontegg/rest-api/feature-flags/index.js");
6310
+ /* harmony import */ var _frontegg_rest_api__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! @frontegg/rest-api */ "../../dist/@frontegg/rest-api/auth/enums.js");
6311
+ /* harmony import */ var _frontegg_rest_api__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! @frontegg/rest-api */ "../../dist/@frontegg/rest-api/auth/interfaces.js");
6308
6312
  /* harmony import */ var _hostedLoginAuthorize_actions__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./hostedLoginAuthorize.actions */ "../../dist/@frontegg/redux-store/auth/LoginState/actions/hostedLoginAuthorize.actions.js");
6309
- /* harmony import */ var _oauthStorage__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../oauthStorage */ "../../dist/@frontegg/redux-store/auth/LoginState/oauthStorage.js");
6310
- /* harmony import */ var _StepUpState_consts__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../../StepUpState/consts */ "../../dist/@frontegg/redux-store/auth/StepUpState/consts.js");
6311
- /* harmony import */ var _toolkit__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../toolkit */ "../../dist/@frontegg/redux-store/toolkit/FronteggNativeModule.js");
6312
- /* harmony import */ var _toolkit__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../toolkit */ "../../dist/@frontegg/redux-store/auth/Entitlements/helpers.js");
6313
- /* harmony import */ var _interfaces__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../interfaces */ "../../dist/@frontegg/redux-store/auth/interfaces.js");
6314
- /* harmony import */ var _consts__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../consts */ "../../dist/@frontegg/redux-store/auth/LoginState/consts.js");
6315
- /* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../helpers */ "../../dist/@frontegg/redux-store/auth/helpers.js");
6313
+ /* harmony import */ var _oauthStorage__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../oauthStorage */ "../../dist/@frontegg/redux-store/auth/LoginState/oauthStorage.js");
6314
+ /* harmony import */ var _StepUpState_consts__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../../StepUpState/consts */ "../../dist/@frontegg/redux-store/auth/StepUpState/consts.js");
6315
+ /* harmony import */ var _toolkit__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../toolkit */ "../../dist/@frontegg/redux-store/toolkit/FronteggNativeModule.js");
6316
+ /* harmony import */ var _toolkit__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../../toolkit */ "../../dist/@frontegg/redux-store/auth/Entitlements/helpers.js");
6317
+ /* harmony import */ var _interfaces__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../interfaces */ "../../dist/@frontegg/redux-store/auth/interfaces.js");
6318
+ /* harmony import */ var _consts__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../consts */ "../../dist/@frontegg/redux-store/auth/LoginState/consts.js");
6319
+ /* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../helpers */ "../../dist/@frontegg/redux-store/auth/helpers.js");
6316
6320
  /* harmony import */ var _MfaState_interfaces__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ../../MfaState/interfaces */ "../../dist/@frontegg/redux-store/auth/MfaState/interfaces.js");
6317
- /* harmony import */ var _SSOState_interfaces__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../SSOState/interfaces */ "../../dist/@frontegg/redux-store/auth/SSOState/interfaces.js");
6318
- /* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../../constants */ "../../dist/@frontegg/redux-store/constants.js");
6321
+ /* harmony import */ var _SSOState_interfaces__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../../SSOState/interfaces */ "../../dist/@frontegg/redux-store/auth/SSOState/interfaces.js");
6322
+ /* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../../constants */ "../../dist/@frontegg/redux-store/constants.js");
6319
6323
 
6320
6324
 
6321
6325
  const _excluded = ["callback", "error"],
@@ -6355,9 +6359,11 @@ const _excluded = ["callback", "error"],
6355
6359
 
6356
6360
 
6357
6361
 
6362
+ const SSO_REDIRECT_DELAY_MS = 2000;
6363
+ const isUsableRedirect = onRedirectTo => typeof onRedirectTo === 'function' && onRedirectTo !== _consts__WEBPACK_IMPORTED_MODULE_2__.defaultOnRedirectTo;
6358
6364
  /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ((store, api, sharedActions) => {
6359
6365
  const actions = sharedActions;
6360
- const contextHolder = _frontegg_rest_api__WEBPACK_IMPORTED_MODULE_2__.ContextHolder.for(store.root.appName);
6366
+ const contextHolder = _frontegg_rest_api__WEBPACK_IMPORTED_MODULE_3__.ContextHolder.for(store.root.appName);
6361
6367
 
6362
6368
  /** @private */
6363
6369
  const __refreshTokenHosted = async () => {
@@ -6372,7 +6378,7 @@ const _excluded = ["callback", "error"],
6372
6378
  return;
6373
6379
  }
6374
6380
  try {
6375
- const tabTenantId = (0,_frontegg_rest_api__WEBPACK_IMPORTED_MODULE_3__.getTabTenantFromSessionStorage)(store.root.appName);
6381
+ const tabTenantId = (0,_frontegg_rest_api__WEBPACK_IMPORTED_MODULE_4__.getTabTenantFromSessionStorage)(store.root.appName);
6376
6382
  const body = (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__["default"])({
6377
6383
  grant_type: 'refresh_token',
6378
6384
  refresh_token: user == null ? void 0 : user.refreshToken
@@ -6417,8 +6423,8 @@ const _excluded = ["callback", "error"],
6417
6423
  user,
6418
6424
  tenants = [],
6419
6425
  activeTenant
6420
- } = await (0,_helpers__WEBPACK_IMPORTED_MODULE_4__.refreshTokenWithRetry)(() => api.auth.refreshTokenV3());
6421
- if ((0,_helpers__WEBPACK_IMPORTED_MODULE_5__.isMfaRequired)(user, store.root.appName)) {
6426
+ } = await (0,_helpers__WEBPACK_IMPORTED_MODULE_5__.refreshTokenWithRetry)(() => api.auth.refreshTokenV3());
6427
+ if ((0,_helpers__WEBPACK_IMPORTED_MODULE_6__.isMfaRequired)(user, store.root.appName)) {
6422
6428
  const mfaRequiredState = await actions.getMfaRequiredState(user);
6423
6429
  actions.setAuthState(mfaRequiredState);
6424
6430
  onRedirectTo(routes.loginUrl, {
@@ -6439,7 +6445,7 @@ const _excluded = ["callback", "error"],
6439
6445
  }, {
6440
6446
  loginState: (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__["default"])({}, loginState, {
6441
6447
  quickLoginToRegister,
6442
- flow: shouldNavigateToRegisterQuickLogin ? _interfaces__WEBPACK_IMPORTED_MODULE_6__.LoginFlow.RegisterQuickLogin : _interfaces__WEBPACK_IMPORTED_MODULE_6__.LoginFlow.Login
6448
+ flow: shouldNavigateToRegisterQuickLogin ? _interfaces__WEBPACK_IMPORTED_MODULE_7__.LoginFlow.RegisterQuickLogin : _interfaces__WEBPACK_IMPORTED_MODULE_7__.LoginFlow.Login
6443
6449
  }),
6444
6450
  isAuthenticated: true
6445
6451
  });
@@ -6461,8 +6467,8 @@ const _excluded = ["callback", "error"],
6461
6467
  const __refreshTokenWithNativeTokens = async () => {
6462
6468
  try {
6463
6469
  const authApi = api.auth;
6464
- const response = await (0,_helpers__WEBPACK_IMPORTED_MODULE_4__.refreshTokenWithRetry)(async () => {
6465
- const tokens = await _toolkit__WEBPACK_IMPORTED_MODULE_7__["default"].getTokens();
6470
+ const response = await (0,_helpers__WEBPACK_IMPORTED_MODULE_5__.refreshTokenWithRetry)(async () => {
6471
+ const tokens = await _toolkit__WEBPACK_IMPORTED_MODULE_8__["default"].getTokens();
6466
6472
  return await authApi.silentOAuthRefreshTokenV3(tokens);
6467
6473
  });
6468
6474
  const updatedUser = await __handleUnnecessaryEntitlementsUpdate(response.user);
@@ -6483,7 +6489,7 @@ const _excluded = ["callback", "error"],
6483
6489
 
6484
6490
  /** @protected */
6485
6491
  const __refreshToken = async () => {
6486
- if (_toolkit__WEBPACK_IMPORTED_MODULE_7__["default"].isGetTokensAvailable()) {
6492
+ if (_toolkit__WEBPACK_IMPORTED_MODULE_8__["default"].isGetTokensAvailable()) {
6487
6493
  await __refreshTokenWithNativeTokens();
6488
6494
  return;
6489
6495
  }
@@ -6508,7 +6514,7 @@ const _excluded = ["callback", "error"],
6508
6514
  var _store$auth$user;
6509
6515
  // @ts-ignore TODO: fix entitlements state type
6510
6516
  const oldEntitlements = (_store$auth$user = store.auth.user) == null ? void 0 : _store$auth$user.entitlements;
6511
- if ((0,_toolkit__WEBPACK_IMPORTED_MODULE_8__.isEntitlementsDeeplyEqual)(oldEntitlements, updatedUser == null ? void 0 : updatedUser.entitlements)) {
6517
+ if ((0,_toolkit__WEBPACK_IMPORTED_MODULE_9__.isEntitlementsDeeplyEqual)(oldEntitlements, updatedUser == null ? void 0 : updatedUser.entitlements)) {
6512
6518
  // set the previous entitlements object
6513
6519
  return (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__["default"])({}, updatedUser, {
6514
6520
  entitlements: oldEntitlements
@@ -6528,7 +6534,7 @@ const _excluded = ["callback", "error"],
6528
6534
  loginState,
6529
6535
  onRedirectTo
6530
6536
  } = store.auth;
6531
- const [preventAuthRedirectOnSocialLogin] = _frontegg_rest_api__WEBPACK_IMPORTED_MODULE_9__.FeatureFlags.getFeatureFlags(['prevent-auth-redirect-on-social-login'], store.root.appName);
6537
+ const [preventAuthRedirectOnSocialLogin] = _frontegg_rest_api__WEBPACK_IMPORTED_MODULE_10__.FeatureFlags.getFeatureFlags(['prevent-auth-redirect-on-social-login'], store.root.appName);
6532
6538
  const invitationToken = url.searchParams.get('invitationToken');
6533
6539
  const redirectRoutes = [routes.socialLoginCallbackUrl, routes.oidcRedirectUrl, routes.samlCallbackUrl, routes.magicLinkCallbackUrl];
6534
6540
  if (!invitationToken) {
@@ -6557,7 +6563,7 @@ const _excluded = ["callback", "error"],
6557
6563
  var _payload$callback;
6558
6564
  const {
6559
6565
  isActive
6560
- } = await (0,_helpers__WEBPACK_IMPORTED_MODULE_10__.retryIfNeeded)(api.auth.getSSOPublicConfiguration, payload == null ? void 0 : payload.retryConfig);
6566
+ } = await (0,_helpers__WEBPACK_IMPORTED_MODULE_11__.retryIfNeeded)(api.auth.getSSOPublicConfiguration, payload == null ? void 0 : payload.retryConfig);
6561
6567
  actions.setAuthState({
6562
6568
  isSSOAuth: isActive
6563
6569
  });
@@ -6576,7 +6582,7 @@ const _excluded = ["callback", "error"],
6576
6582
  let ssoACS;
6577
6583
  try {
6578
6584
  var _metadata$configurati;
6579
- const metadata = await (0,_helpers__WEBPACK_IMPORTED_MODULE_10__.retryIfNeeded)(api.metadata.getSamlMetadata, payload == null ? void 0 : payload.retryConfig);
6585
+ const metadata = await (0,_helpers__WEBPACK_IMPORTED_MODULE_11__.retryIfNeeded)(api.metadata.getSamlMetadata, payload == null ? void 0 : payload.retryConfig);
6580
6586
  ssoACS = metadata == null ? void 0 : (_metadata$configurati = metadata.configuration) == null ? void 0 : _metadata$configurati.acsUrl;
6581
6587
  } catch (e) {
6582
6588
  console.error(e);
@@ -6602,8 +6608,8 @@ const _excluded = ["callback", "error"],
6602
6608
  onRedirectTo,
6603
6609
  routes
6604
6610
  } = store.auth;
6605
- if ((0,_helpers__WEBPACK_IMPORTED_MODULE_5__.isMfaRequired)(user, store.root.appName)) {
6606
- const mfaRequiredState = await actions.getMfaRequiredState(user, _constants__WEBPACK_IMPORTED_MODULE_11__.DEFAULT_RETRY_CONFIG, true);
6611
+ if ((0,_helpers__WEBPACK_IMPORTED_MODULE_6__.isMfaRequired)(user, store.root.appName)) {
6612
+ const mfaRequiredState = await actions.getMfaRequiredState(user, _constants__WEBPACK_IMPORTED_MODULE_12__.DEFAULT_RETRY_CONFIG, true);
6607
6613
  actions.setAuthState(mfaRequiredState);
6608
6614
  onRedirectTo(routes.loginUrl, {
6609
6615
  preserveQueryParams: true
@@ -6614,17 +6620,17 @@ const _excluded = ["callback", "error"],
6614
6620
  Object.assign(store.auth.loginState, state);
6615
6621
  };
6616
6622
  const resetLoginState = () => {
6617
- (0,_helpers__WEBPACK_IMPORTED_MODULE_10__.deepResetState)(store, ['auth', 'loginState'], _state__WEBPACK_IMPORTED_MODULE_12__.initialState);
6623
+ (0,_helpers__WEBPACK_IMPORTED_MODULE_11__.deepResetState)(store, ['auth', 'loginState'], _state__WEBPACK_IMPORTED_MODULE_13__.initialState);
6618
6624
  };
6619
6625
  const getRetryWithBlockingCallbackPayload = requestName => {
6620
6626
  const callback = (_, error) => {
6621
6627
  if (!error || error.statusCode < 500) return;
6622
6628
  actions.setErrorByRequestName({
6623
6629
  requestName,
6624
- traceId: (0,_helpers__WEBPACK_IMPORTED_MODULE_10__.errorTraceId)(error)
6630
+ traceId: (0,_helpers__WEBPACK_IMPORTED_MODULE_11__.errorTraceId)(error)
6625
6631
  });
6626
6632
  };
6627
- return (0,_helpers__WEBPACK_IMPORTED_MODULE_10__.withRetryConfig)({
6633
+ return (0,_helpers__WEBPACK_IMPORTED_MODULE_11__.withRetryConfig)({
6628
6634
  callback
6629
6635
  });
6630
6636
  };
@@ -6636,19 +6642,19 @@ const _excluded = ["callback", "error"],
6636
6642
  actions.setAuthState({
6637
6643
  isLoading: true
6638
6644
  });
6639
- calls.push(actions.loadSocialLoginsConfigurationV2((0,_helpers__WEBPACK_IMPORTED_MODULE_10__.withRetryConfig)()));
6640
- calls.push(actions.loadAllowSignUps(getRetryWithBlockingCallbackPayload(_interfaces__WEBPACK_IMPORTED_MODULE_13__.REQUEST_NAME.LOAD_ALLOW_SIGNUPS)));
6641
- calls.push(actions.loadPublicAuthStrategiesPolicy(getRetryWithBlockingCallbackPayload(_interfaces__WEBPACK_IMPORTED_MODULE_13__.REQUEST_NAME.LOAD_PUBLIC_AUTH_STRATEGIES_POLICY)));
6645
+ calls.push(actions.loadSocialLoginsConfigurationV2((0,_helpers__WEBPACK_IMPORTED_MODULE_11__.withRetryConfig)()));
6646
+ calls.push(actions.loadAllowSignUps(getRetryWithBlockingCallbackPayload(_interfaces__WEBPACK_IMPORTED_MODULE_14__.REQUEST_NAME.LOAD_ALLOW_SIGNUPS)));
6647
+ calls.push(actions.loadPublicAuthStrategiesPolicy(getRetryWithBlockingCallbackPayload(_interfaces__WEBPACK_IMPORTED_MODULE_14__.REQUEST_NAME.LOAD_PUBLIC_AUTH_STRATEGIES_POLICY)));
6642
6648
  calls.push(actions.loadSignUpStrategies());
6643
- calls.push(__loadSSOPublicConfigurationFunction(getRetryWithBlockingCallbackPayload(_interfaces__WEBPACK_IMPORTED_MODULE_13__.REQUEST_NAME.LOAD_SSO_PUBLIC_CONFIGURATION)));
6644
- calls.push(actions.loadVendorPublicInfo((0,_helpers__WEBPACK_IMPORTED_MODULE_10__.withRetryConfig)()));
6645
- calls.push(__refreshMetadata((0,_helpers__WEBPACK_IMPORTED_MODULE_10__.withRetryConfig)()));
6649
+ calls.push(__loadSSOPublicConfigurationFunction(getRetryWithBlockingCallbackPayload(_interfaces__WEBPACK_IMPORTED_MODULE_14__.REQUEST_NAME.LOAD_SSO_PUBLIC_CONFIGURATION)));
6650
+ calls.push(actions.loadVendorPublicInfo((0,_helpers__WEBPACK_IMPORTED_MODULE_11__.withRetryConfig)()));
6651
+ calls.push(__refreshMetadata((0,_helpers__WEBPACK_IMPORTED_MODULE_11__.withRetryConfig)()));
6646
6652
  /*
6647
6653
  We will load custom login routes only if custom login is enabled
6648
6654
  to check if custom login is enabled without the tenant alias (search-param/subdomain)
6649
6655
  we have to wait for the user state (refreshToken request)
6650
6656
  */
6651
- callsAfterRefresh.push(actions.loadCustomLoginRoutes(getRetryWithBlockingCallbackPayload(_interfaces__WEBPACK_IMPORTED_MODULE_13__.REQUEST_NAME.LOAD_CUSTOM_LOGIN_ROUTES)));
6657
+ callsAfterRefresh.push(actions.loadCustomLoginRoutes(getRetryWithBlockingCallbackPayload(_interfaces__WEBPACK_IMPORTED_MODULE_14__.REQUEST_NAME.LOAD_CUSTOM_LOGIN_ROUTES)));
6652
6658
  }
6653
6659
  await Promise.all(calls);
6654
6660
  if (callsAfterRefresh.length > 0) {
@@ -6660,14 +6666,14 @@ const _excluded = ["callback", "error"],
6660
6666
  };
6661
6667
  const requestAuthorizeSSR = async payload => {
6662
6668
  const calls = [];
6663
- calls.push(actions.loadSocialLoginsConfigurationV2((0,_helpers__WEBPACK_IMPORTED_MODULE_10__.withRetryConfig)()));
6664
- calls.push(actions.loadAllowSignUps(getRetryWithBlockingCallbackPayload(_interfaces__WEBPACK_IMPORTED_MODULE_13__.REQUEST_NAME.LOAD_ALLOW_SIGNUPS)));
6665
- calls.push(__loadSSOPublicConfigurationFunction(getRetryWithBlockingCallbackPayload(_interfaces__WEBPACK_IMPORTED_MODULE_13__.REQUEST_NAME.LOAD_SSO_PUBLIC_CONFIGURATION)));
6669
+ calls.push(actions.loadSocialLoginsConfigurationV2((0,_helpers__WEBPACK_IMPORTED_MODULE_11__.withRetryConfig)()));
6670
+ calls.push(actions.loadAllowSignUps(getRetryWithBlockingCallbackPayload(_interfaces__WEBPACK_IMPORTED_MODULE_14__.REQUEST_NAME.LOAD_ALLOW_SIGNUPS)));
6671
+ calls.push(__loadSSOPublicConfigurationFunction(getRetryWithBlockingCallbackPayload(_interfaces__WEBPACK_IMPORTED_MODULE_14__.REQUEST_NAME.LOAD_SSO_PUBLIC_CONFIGURATION)));
6666
6672
  calls.push(actions.loadSignUpStrategies());
6667
- calls.push(actions.loadVendorPublicInfo((0,_helpers__WEBPACK_IMPORTED_MODULE_10__.withRetryConfig)()));
6673
+ calls.push(actions.loadVendorPublicInfo((0,_helpers__WEBPACK_IMPORTED_MODULE_11__.withRetryConfig)()));
6668
6674
  calls.push(__refreshMetadata());
6669
6675
  calls.push(__isMFARequiredSSR(payload));
6670
- calls.push(actions.loadCustomLoginRoutes(getRetryWithBlockingCallbackPayload(_interfaces__WEBPACK_IMPORTED_MODULE_13__.REQUEST_NAME.LOAD_CUSTOM_LOGIN_ROUTES)));
6676
+ calls.push(actions.loadCustomLoginRoutes(getRetryWithBlockingCallbackPayload(_interfaces__WEBPACK_IMPORTED_MODULE_14__.REQUEST_NAME.LOAD_CUSTOM_LOGIN_ROUTES)));
6671
6677
  await Promise.all(calls);
6672
6678
  };
6673
6679
  const ssoPreloginFailed = async _ref3 => {
@@ -6679,32 +6685,55 @@ const _excluded = ["callback", "error"],
6679
6685
  const publicPolicy = store.auth.securityPolicyState.publicPolicy.policy;
6680
6686
  if (!(publicPolicy != null && publicPolicy.authStrategy)) {
6681
6687
  actions.setLoginState({
6682
- step: _interfaces__WEBPACK_IMPORTED_MODULE_6__.LoginStep.loginWithPassword,
6688
+ step: _interfaces__WEBPACK_IMPORTED_MODULE_7__.LoginStep.loginWithPassword,
6683
6689
  loading: false
6684
6690
  });
6685
6691
  callback == null ? void 0 : callback();
6686
6692
  return;
6687
6693
  }
6688
- if ((publicPolicy == null ? void 0 : publicPolicy.authStrategy) === _frontegg_rest_api__WEBPACK_IMPORTED_MODULE_14__.AuthStrategyEnum.EmailAndPassword) {
6694
+ if ((publicPolicy == null ? void 0 : publicPolicy.authStrategy) === _frontegg_rest_api__WEBPACK_IMPORTED_MODULE_15__.AuthStrategyEnum.EmailAndPassword) {
6689
6695
  actions.setLoginState({
6690
- step: _interfaces__WEBPACK_IMPORTED_MODULE_6__.LoginStep.loginWithPassword,
6696
+ step: _interfaces__WEBPACK_IMPORTED_MODULE_7__.LoginStep.loginWithPassword,
6691
6697
  loading: false
6692
6698
  });
6693
6699
  callback == null ? void 0 : callback();
6694
- } else if ([_frontegg_rest_api__WEBPACK_IMPORTED_MODULE_14__.AuthStrategyEnum.MagicLink, _frontegg_rest_api__WEBPACK_IMPORTED_MODULE_14__.AuthStrategyEnum.Code, _frontegg_rest_api__WEBPACK_IMPORTED_MODULE_14__.AuthStrategyEnum.SmsCode].includes(publicPolicy == null ? void 0 : publicPolicy.authStrategy)) {
6700
+ } else if ([_frontegg_rest_api__WEBPACK_IMPORTED_MODULE_15__.AuthStrategyEnum.MagicLink, _frontegg_rest_api__WEBPACK_IMPORTED_MODULE_15__.AuthStrategyEnum.Code, _frontegg_rest_api__WEBPACK_IMPORTED_MODULE_15__.AuthStrategyEnum.SmsCode].includes(publicPolicy == null ? void 0 : publicPolicy.authStrategy)) {
6695
6701
  await actions.passwordlessPreLogin((0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__["default"])({}, body, {
6696
6702
  type: publicPolicy == null ? void 0 : publicPolicy.authStrategy,
6697
6703
  callback
6698
6704
  }));
6699
6705
  } else {
6700
6706
  actions.setLoginState({
6701
- step: _interfaces__WEBPACK_IMPORTED_MODULE_6__.LoginStep.loginWithPassword,
6707
+ step: _interfaces__WEBPACK_IMPORTED_MODULE_7__.LoginStep.loginWithPassword,
6702
6708
  loading: false,
6703
- error: (0,_helpers__WEBPACK_IMPORTED_MODULE_15__.errorHandler)(error)
6709
+ error: (0,_helpers__WEBPACK_IMPORTED_MODULE_16__.errorHandler)(error)
6704
6710
  });
6705
6711
  callback == null ? void 0 : callback();
6706
6712
  }
6707
6713
  };
6714
+
6715
+ // v6 parity (takeLeading): a preLogin called while another is in flight is dropped.
6716
+ let preLoginInFlight = false;
6717
+ let latestPreLoginAttempt = 0;
6718
+
6719
+ // Read on use: the login box installs onRedirectTo lazily, logout() clears it and the store default is a no-op.
6720
+ const redirectToFullPage = url => {
6721
+ const onRedirectTo = [store.auth.onRedirectTo, contextHolder.onRedirectTo].find(isUsableRedirect);
6722
+ if (onRedirectTo) {
6723
+ onRedirectTo(url, {
6724
+ refresh: true
6725
+ });
6726
+ } else {
6727
+ window.location.href = url;
6728
+ }
6729
+ };
6730
+ const scheduleSsoRedirect = (ssoRedirectUrl, attempt) => {
6731
+ setTimeout(() => {
6732
+ if (attempt === latestPreLoginAttempt && store.auth.loginState.step === _interfaces__WEBPACK_IMPORTED_MODULE_7__.LoginStep.redirectToSSO) {
6733
+ redirectToFullPage(ssoRedirectUrl);
6734
+ }
6735
+ }, SSO_REDIRECT_DELAY_MS);
6736
+ };
6708
6737
  const preLogin = async payload => {
6709
6738
  const {
6710
6739
  email,
@@ -6713,12 +6742,18 @@ const _excluded = ["callback", "error"],
6713
6742
  invitationToken,
6714
6743
  callback
6715
6744
  } = payload;
6745
+ if (preLoginInFlight) {
6746
+ callback == null ? void 0 : callback();
6747
+ return;
6748
+ }
6749
+ preLoginInFlight = true;
6750
+ latestPreLoginAttempt += 1;
6751
+ const attempt = latestPreLoginAttempt;
6716
6752
  setLoginState({
6717
6753
  loading: true
6718
6754
  });
6719
6755
  try {
6720
- const onRedirectTo = store.auth.onRedirectTo;
6721
- const tenantId = (0,_helpers__WEBPACK_IMPORTED_MODULE_16__.getSearchParam)(_helpers__WEBPACK_IMPORTED_MODULE_16__.TENANT_ID_PARAM_KEY);
6756
+ const tenantId = (0,_helpers__WEBPACK_IMPORTED_MODULE_17__.getSearchParam)(_helpers__WEBPACK_IMPORTED_MODULE_17__.TENANT_ID_PARAM_KEY);
6722
6757
  const preLoginResult = await api.auth.preLoginV2((0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__["default"])({}, email ? {
6723
6758
  email
6724
6759
  } : {}, username ? {
@@ -6732,42 +6767,36 @@ const _excluded = ["callback", "error"],
6732
6767
  addressType
6733
6768
  } = preLoginResult != null ? preLoginResult : {};
6734
6769
  if (address) {
6735
- if (addressType === _frontegg_rest_api__WEBPACK_IMPORTED_MODULE_17__.PreLoginAddressType.External) {
6770
+ if (addressType === _frontegg_rest_api__WEBPACK_IMPORTED_MODULE_18__.PreLoginAddressType.External) {
6736
6771
  // Domain-based routing: navigate to the vendor legacy login URL immediately,
6737
6772
  // skipping the SSO interstitial and the SSO/OIDC-specific handling.
6738
6773
  setLoginState({
6739
6774
  loading: false
6740
6775
  });
6741
- onRedirectTo(address, {
6742
- refresh: true
6743
- });
6776
+ redirectToFullPage(address);
6744
6777
  return;
6745
6778
  }
6746
6779
  let ssoRedirectUrl = address;
6747
- if (idpType === _SSOState_interfaces__WEBPACK_IMPORTED_MODULE_18__.SamlVendors.Oidc && !ssoRedirectUrl.includes('redirect_uri')) {
6780
+ if (idpType === _SSOState_interfaces__WEBPACK_IMPORTED_MODULE_19__.SamlVendors.Oidc && !ssoRedirectUrl.includes('redirect_uri')) {
6748
6781
  const {
6749
6782
  oidcRedirectUrl
6750
6783
  } = store.auth.routes;
6751
6784
  ssoRedirectUrl += `&redirect_uri=${window.location.origin}${oidcRedirectUrl}`;
6752
6785
  }
6753
- if (_toolkit__WEBPACK_IMPORTED_MODULE_7__["default"].isLoginWithSSOAvailable()) {
6786
+ if (_toolkit__WEBPACK_IMPORTED_MODULE_8__["default"].isLoginWithSSOAvailable()) {
6754
6787
  var _ref4;
6755
- _toolkit__WEBPACK_IMPORTED_MODULE_7__["default"].loginWithSSO((_ref4 = email != null ? email : username) != null ? _ref4 : '');
6788
+ _toolkit__WEBPACK_IMPORTED_MODULE_8__["default"].loginWithSSO((_ref4 = email != null ? email : username) != null ? _ref4 : '');
6756
6789
  setLoginState({
6757
6790
  loading: false
6758
6791
  });
6759
6792
  callback == null ? void 0 : callback();
6760
6793
  } else {
6761
6794
  setLoginState({
6762
- step: _interfaces__WEBPACK_IMPORTED_MODULE_6__.LoginStep.redirectToSSO,
6795
+ step: _interfaces__WEBPACK_IMPORTED_MODULE_7__.LoginStep.redirectToSSO,
6763
6796
  loading: false,
6764
6797
  ssoRedirectUrl
6765
6798
  });
6766
- setTimeout(() => {
6767
- onRedirectTo(ssoRedirectUrl, {
6768
- refresh: true
6769
- });
6770
- }, 2000);
6799
+ scheduleSsoRedirect(ssoRedirectUrl, attempt);
6771
6800
  }
6772
6801
  } else {
6773
6802
  await ssoPreloginFailed((0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__["default"])({}, username ? {
@@ -6791,6 +6820,8 @@ const _excluded = ["callback", "error"],
6791
6820
  invitationToken,
6792
6821
  error: e
6793
6822
  }));
6823
+ } finally {
6824
+ preLoginInFlight = false;
6794
6825
  }
6795
6826
  };
6796
6827
  const postLogin = async payload => {
@@ -6818,7 +6849,7 @@ const _excluded = ["callback", "error"],
6818
6849
  email: user.email,
6819
6850
  name: user.name
6820
6851
  };
6821
- (0,_helpers__WEBPACK_IMPORTED_MODULE_19__.reportGTMEvent)(_helpers__WEBPACK_IMPORTED_MODULE_19__.GTMEventAction.LOGIN_COMPLETED, loginCompletedPayload);
6852
+ (0,_helpers__WEBPACK_IMPORTED_MODULE_20__.reportGTMEvent)(_helpers__WEBPACK_IMPORTED_MODULE_20__.GTMEventAction.LOGIN_COMPLETED, loginCompletedPayload);
6822
6853
  }
6823
6854
  await actions.afterAuthNavigation();
6824
6855
  } catch (e) {
@@ -6826,7 +6857,7 @@ const _excluded = ["callback", "error"],
6826
6857
  onRedirectTo(routes.authenticatedUrl);
6827
6858
  }, 1000);
6828
6859
  setLoginState({
6829
- step: _interfaces__WEBPACK_IMPORTED_MODULE_6__.LoginStep.loginWithSSOFailed,
6860
+ step: _interfaces__WEBPACK_IMPORTED_MODULE_7__.LoginStep.loginWithSSOFailed,
6830
6861
  loading: false
6831
6862
  });
6832
6863
  }
@@ -6861,17 +6892,17 @@ const _excluded = ["callback", "error"],
6861
6892
  onRedirectTo,
6862
6893
  routes
6863
6894
  } = store.auth;
6864
- if ((0,_helpers__WEBPACK_IMPORTED_MODULE_5__.isMfaRequired)(user, store.root.appName)) {
6865
- const mfaRequiredState = await actions.getMfaRequiredState(user, _constants__WEBPACK_IMPORTED_MODULE_11__.DEFAULT_RETRY_CONFIG, true, email);
6895
+ if ((0,_helpers__WEBPACK_IMPORTED_MODULE_6__.isMfaRequired)(user, store.root.appName)) {
6896
+ const mfaRequiredState = await actions.getMfaRequiredState(user, _constants__WEBPACK_IMPORTED_MODULE_12__.DEFAULT_RETRY_CONFIG, true, email);
6866
6897
  actions.setAuthState(mfaRequiredState);
6867
6898
  onRedirectTo(routes.loginUrl, {
6868
6899
  preserveQueryParams: true
6869
6900
  });
6870
6901
  } else {
6871
6902
  const [securityCenterLoginFlows] = await actions.getFeatureFlags(['security-center-show-login-flows']);
6872
- if ((0,_helpers__WEBPACK_IMPORTED_MODULE_5__.isResetPasswordRequired)(user, store.root.appName)) {
6903
+ if ((0,_helpers__WEBPACK_IMPORTED_MODULE_6__.isResetPasswordRequired)(user, store.root.appName)) {
6873
6904
  setLoginState({
6874
- step: _interfaces__WEBPACK_IMPORTED_MODULE_6__.LoginStep.passwordRotationExpired,
6905
+ step: _interfaces__WEBPACK_IMPORTED_MODULE_7__.LoginStep.passwordRotationExpired,
6875
6906
  loading: false,
6876
6907
  resetPasswordToken: user.resetPasswordToken,
6877
6908
  userId: user.userId
@@ -6894,7 +6925,7 @@ const _excluded = ["callback", "error"],
6894
6925
  loading: false,
6895
6926
  error: undefined,
6896
6927
  mfaToken: user.mfaToken,
6897
- step: loginState.flow === _interfaces__WEBPACK_IMPORTED_MODULE_6__.LoginFlow.Login ? _interfaces__WEBPACK_IMPORTED_MODULE_6__.LoginStep.success : loginState.step,
6928
+ step: loginState.flow === _interfaces__WEBPACK_IMPORTED_MODULE_7__.LoginFlow.Login ? _interfaces__WEBPACK_IMPORTED_MODULE_7__.LoginStep.success : loginState.step,
6898
6929
  tenants,
6899
6930
  tenantsLoading: true,
6900
6931
  isBreachedPassword: user.isBreachedPassword,
@@ -6914,27 +6945,27 @@ const _excluded = ["callback", "error"],
6914
6945
  email,
6915
6946
  name: user.name
6916
6947
  };
6917
- (0,_helpers__WEBPACK_IMPORTED_MODULE_19__.reportGTMEvent)(_helpers__WEBPACK_IMPORTED_MODULE_19__.GTMEventAction.LOGIN_COMPLETED, loginCompletedPayload);
6948
+ (0,_helpers__WEBPACK_IMPORTED_MODULE_20__.reportGTMEvent)(_helpers__WEBPACK_IMPORTED_MODULE_20__.GTMEventAction.LOGIN_COMPLETED, loginCompletedPayload);
6918
6949
  }
6919
- if (loginState.flow === _interfaces__WEBPACK_IMPORTED_MODULE_6__.LoginFlow.Login) {
6950
+ if (loginState.flow === _interfaces__WEBPACK_IMPORTED_MODULE_7__.LoginFlow.Login) {
6920
6951
  if (securityCenterLoginFlows && user.isBreachedPassword && !isAuthenticated) {
6921
6952
  setLoginState({
6922
- step: _interfaces__WEBPACK_IMPORTED_MODULE_6__.LoginStep.breachedPassword,
6953
+ step: _interfaces__WEBPACK_IMPORTED_MODULE_7__.LoginStep.breachedPassword,
6923
6954
  loading: false
6924
6955
  });
6925
6956
  } else {
6926
6957
  if (isAuthenticated) {
6927
- const shouldShowPasswordRotationPrompt = (0,_helpers__WEBPACK_IMPORTED_MODULE_16__.shouldShowPasswordRotationPromptFunc)(user);
6958
+ const shouldShowPasswordRotationPrompt = (0,_helpers__WEBPACK_IMPORTED_MODULE_17__.shouldShowPasswordRotationPromptFunc)(user);
6928
6959
  if (shouldShowPasswordRotationPrompt) {
6929
6960
  setLoginState({
6930
- step: _interfaces__WEBPACK_IMPORTED_MODULE_6__.LoginStep.passwordRotationNotification,
6961
+ step: _interfaces__WEBPACK_IMPORTED_MODULE_7__.LoginStep.passwordRotationNotification,
6931
6962
  loading: false
6932
6963
  });
6933
6964
  } else {
6934
6965
  const shouldShowPromptPasskeys = await actions.__shouldShowPromptPasskeys();
6935
6966
  if (shouldShowPromptPasskeys) {
6936
6967
  setLoginState({
6937
- step: _interfaces__WEBPACK_IMPORTED_MODULE_6__.LoginStep.promptPasskeys,
6968
+ step: _interfaces__WEBPACK_IMPORTED_MODULE_7__.LoginStep.promptPasskeys,
6938
6969
  loading: false
6939
6970
  });
6940
6971
  onRedirectTo(routes.loginUrl, {
@@ -6949,8 +6980,8 @@ const _excluded = ["callback", "error"],
6949
6980
  }
6950
6981
  }
6951
6982
  }
6952
- if (_toolkit__WEBPACK_IMPORTED_MODULE_7__["default"].isSuggestSavePasswordAvailable()) {
6953
- _toolkit__WEBPACK_IMPORTED_MODULE_7__["default"].suggestSavePassword(email, password);
6983
+ if (_toolkit__WEBPACK_IMPORTED_MODULE_8__["default"].isSuggestSavePasswordAvailable()) {
6984
+ _toolkit__WEBPACK_IMPORTED_MODULE_8__["default"].suggestSavePassword(email, password);
6954
6985
  }
6955
6986
 
6956
6987
  // TODO: extract item name to constants
@@ -6962,7 +6993,7 @@ const _excluded = ["callback", "error"],
6962
6993
  callback == null ? void 0 : callback(false, e);
6963
6994
  setLoginState({
6964
6995
  email,
6965
- error: (0,_helpers__WEBPACK_IMPORTED_MODULE_15__.errorHandler)(e),
6996
+ error: (0,_helpers__WEBPACK_IMPORTED_MODULE_16__.errorHandler)(e),
6966
6997
  loading: false
6967
6998
  });
6968
6999
  }
@@ -6971,11 +7002,11 @@ const _excluded = ["callback", "error"],
6971
7002
  keepHostedOAuthState = false
6972
7003
  } = {}) => {
6973
7004
  if (contextHolder.isSessionPerTenantEnabled()) {
6974
- (0,_frontegg_rest_api__WEBPACK_IMPORTED_MODULE_3__.removeTabTenantFromSessionStorage)();
7005
+ (0,_frontegg_rest_api__WEBPACK_IMPORTED_MODULE_4__.removeTabTenantFromSessionStorage)();
6975
7006
  }
6976
7007
  // Step-up re-login goes through silentLogout but still needs the hosted OAuth state to finish the client flow.
6977
7008
  if (!keepHostedOAuthState) {
6978
- (0,_oauthStorage__WEBPACK_IMPORTED_MODULE_20__.clearHostedOAuthState)();
7009
+ (0,_oauthStorage__WEBPACK_IMPORTED_MODULE_21__.clearHostedOAuthState)();
6979
7010
  }
6980
7011
  };
6981
7012
  const logout = async payload => {
@@ -7004,7 +7035,7 @@ const _excluded = ["callback", "error"],
7004
7035
  } catch {
7005
7036
  /* empty */
7006
7037
  }
7007
- const isStepUpInProgress = !!((_window2 = window) != null && _window2.localStorage.getItem(_StepUpState_consts__WEBPACK_IMPORTED_MODULE_21__.SHOULD_STEP_UP_KEY));
7038
+ const isStepUpInProgress = !!((_window2 = window) != null && _window2.localStorage.getItem(_StepUpState_consts__WEBPACK_IMPORTED_MODULE_22__.SHOULD_STEP_UP_KEY));
7008
7039
  clearLogoutLocalState({
7009
7040
  keepHostedOAuthState: isStepUpInProgress
7010
7041
  });
@@ -7023,7 +7054,7 @@ const _excluded = ["callback", "error"],
7023
7054
  setLoginState({
7024
7055
  loading: false,
7025
7056
  error: undefined,
7026
- step: _interfaces__WEBPACK_IMPORTED_MODULE_6__.LoginStep.preLogin
7057
+ step: _interfaces__WEBPACK_IMPORTED_MODULE_7__.LoginStep.preLogin
7027
7058
  });
7028
7059
  actions.setAuthState({
7029
7060
  user: undefined,
@@ -7033,7 +7064,7 @@ const _excluded = ["callback", "error"],
7033
7064
  } catch (e) {
7034
7065
  var _payload$callback5;
7035
7066
  setLoginState({
7036
- error: (0,_helpers__WEBPACK_IMPORTED_MODULE_15__.errorHandler)(e),
7067
+ error: (0,_helpers__WEBPACK_IMPORTED_MODULE_16__.errorHandler)(e),
7037
7068
  loading: false
7038
7069
  });
7039
7070
  (_payload$callback5 = payload.callback) == null ? void 0 : _payload$callback5.call(payload, false, e);
@@ -7052,10 +7083,10 @@ const _excluded = ["callback", "error"],
7052
7083
  // TODO: fix @frontegg/rest-api return value
7053
7084
  // @ts-ignore
7054
7085
  const preloginRes = await api.auth.passwordlessPreLogin((0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__["default"])({}, payload, {
7055
- type: _frontegg_rest_api__WEBPACK_IMPORTED_MODULE_14__.AuthStrategyEnum.SmsCode
7086
+ type: _frontegg_rest_api__WEBPACK_IMPORTED_MODULE_15__.AuthStrategyEnum.SmsCode
7056
7087
  }));
7057
7088
  setLoginState({
7058
- step: _interfaces__WEBPACK_IMPORTED_MODULE_6__.LoginStep.loginWithQuickSmsOtc,
7089
+ step: _interfaces__WEBPACK_IMPORTED_MODULE_7__.LoginStep.loginWithQuickSmsOtc,
7059
7090
  loading: false,
7060
7091
  phoneNumber: preloginRes == null ? void 0 : preloginRes.phoneNumber,
7061
7092
  error: undefined
@@ -7063,7 +7094,7 @@ const _excluded = ["callback", "error"],
7063
7094
  callback == null ? void 0 : callback(true);
7064
7095
  } catch (e) {
7065
7096
  setLoginState({
7066
- error: (0,_helpers__WEBPACK_IMPORTED_MODULE_15__.errorHandler)(e),
7097
+ error: (0,_helpers__WEBPACK_IMPORTED_MODULE_16__.errorHandler)(e),
7067
7098
  loading: false
7068
7099
  });
7069
7100
  callback == null ? void 0 : callback(false, e);
@@ -7083,13 +7114,13 @@ const _excluded = ["callback", "error"],
7083
7114
  phoneNumber: payload.phoneNumber,
7084
7115
  loading: false,
7085
7116
  changePhoneId: changePhoneRes.changePhoneId,
7086
- step: _interfaces__WEBPACK_IMPORTED_MODULE_6__.LoginStep.loginWithQuickSmsOtc,
7117
+ step: _interfaces__WEBPACK_IMPORTED_MODULE_7__.LoginStep.loginWithQuickSmsOtc,
7087
7118
  error: undefined
7088
7119
  });
7089
7120
  callback == null ? void 0 : callback(true);
7090
7121
  } catch (e) {
7091
7122
  setLoginState({
7092
- error: (0,_helpers__WEBPACK_IMPORTED_MODULE_15__.errorHandler)(e),
7123
+ error: (0,_helpers__WEBPACK_IMPORTED_MODULE_16__.errorHandler)(e),
7093
7124
  loading: false
7094
7125
  });
7095
7126
  }
@@ -7110,7 +7141,7 @@ const _excluded = ["callback", "error"],
7110
7141
  callback == null ? void 0 : callback(true);
7111
7142
  } catch (e) {
7112
7143
  setLoginState({
7113
- error: (0,_helpers__WEBPACK_IMPORTED_MODULE_15__.errorHandler)(e),
7144
+ error: (0,_helpers__WEBPACK_IMPORTED_MODULE_16__.errorHandler)(e),
7114
7145
  loading: false
7115
7146
  });
7116
7147
  }
@@ -7126,11 +7157,11 @@ const _excluded = ["callback", "error"],
7126
7157
  loading: true
7127
7158
  });
7128
7159
  let email;
7129
- if ((0,_helpers__WEBPACK_IMPORTED_MODULE_16__.isEmailPayload)(payload)) {
7160
+ if ((0,_helpers__WEBPACK_IMPORTED_MODULE_17__.isEmailPayload)(payload)) {
7130
7161
  email = payload.email;
7131
7162
  }
7132
7163
  let username;
7133
- if ((0,_helpers__WEBPACK_IMPORTED_MODULE_16__.isUsernamePayload)(payload)) {
7164
+ if ((0,_helpers__WEBPACK_IMPORTED_MODULE_17__.isUsernamePayload)(payload)) {
7134
7165
  username = payload.username;
7135
7166
  }
7136
7167
  // TODO: [Typescript 4.8] fix @frontegg/rest-api return value
@@ -7140,7 +7171,7 @@ const _excluded = ["callback", "error"],
7140
7171
  username: (_username = username) != null ? _username : ''
7141
7172
  }));
7142
7173
  // @ts-ignore
7143
- const step = _consts__WEBPACK_IMPORTED_MODULE_22__.authStrategyLoginStepMap[payload.type];
7174
+ const step = _consts__WEBPACK_IMPORTED_MODULE_2__.authStrategyLoginStepMap[payload.type];
7144
7175
  setLoginState({
7145
7176
  step,
7146
7177
  loading: false,
@@ -7152,7 +7183,7 @@ const _excluded = ["callback", "error"],
7152
7183
  callback == null ? void 0 : callback();
7153
7184
  } catch (e) {
7154
7185
  setLoginState({
7155
- error: (0,_helpers__WEBPACK_IMPORTED_MODULE_15__.errorHandler)(e),
7186
+ error: (0,_helpers__WEBPACK_IMPORTED_MODULE_16__.errorHandler)(e),
7156
7187
  loading: false
7157
7188
  });
7158
7189
  callback == null ? void 0 : callback(null, e);
@@ -7177,7 +7208,7 @@ const _excluded = ["callback", "error"],
7177
7208
  routes,
7178
7209
  onRedirectTo
7179
7210
  } = store.auth;
7180
- if ((0,_helpers__WEBPACK_IMPORTED_MODULE_5__.isMfaRequired)(user, store.root.appName)) {
7211
+ if ((0,_helpers__WEBPACK_IMPORTED_MODULE_6__.isMfaRequired)(user, store.root.appName)) {
7181
7212
  const mfaRequiredState = await actions.getMfaRequiredState(user);
7182
7213
  actions.setAuthState(mfaRequiredState);
7183
7214
  onRedirectTo(routes.loginUrl, {
@@ -7190,14 +7221,14 @@ const _excluded = ["callback", "error"],
7190
7221
  var _events$userVerified;
7191
7222
  const userVerifiedPayload = {
7192
7223
  email: user.email,
7193
- origin: _interfaces__WEBPACK_IMPORTED_MODULE_13__.UserVerifiedOriginTypes.PASSWORDLESS,
7224
+ origin: _interfaces__WEBPACK_IMPORTED_MODULE_14__.UserVerifiedOriginTypes.PASSWORDLESS,
7194
7225
  id: user.id,
7195
7226
  tenantId: user.tenantId,
7196
7227
  createdAt: new Date(),
7197
7228
  name: user.name
7198
7229
  };
7199
7230
  events == null ? void 0 : (_events$userVerified = events.userVerified) == null ? void 0 : _events$userVerified.call(events, userVerifiedPayload);
7200
- (0,_helpers__WEBPACK_IMPORTED_MODULE_19__.reportGTMEvent)(_helpers__WEBPACK_IMPORTED_MODULE_19__.GTMEventAction.USER_VERIFIED, userVerifiedPayload);
7231
+ (0,_helpers__WEBPACK_IMPORTED_MODULE_20__.reportGTMEvent)(_helpers__WEBPACK_IMPORTED_MODULE_20__.GTMEventAction.USER_VERIFIED, userVerifiedPayload);
7201
7232
  }
7202
7233
  const loginCompletedPayload = {
7203
7234
  tenantId: user.tenantId,
@@ -7207,7 +7238,7 @@ const _excluded = ["callback", "error"],
7207
7238
  email: user.email,
7208
7239
  name: user.name
7209
7240
  };
7210
- (0,_helpers__WEBPACK_IMPORTED_MODULE_19__.reportGTMEvent)(_helpers__WEBPACK_IMPORTED_MODULE_19__.GTMEventAction.LOGIN_COMPLETED, loginCompletedPayload);
7241
+ (0,_helpers__WEBPACK_IMPORTED_MODULE_20__.reportGTMEvent)(_helpers__WEBPACK_IMPORTED_MODULE_20__.GTMEventAction.LOGIN_COMPLETED, loginCompletedPayload);
7211
7242
  if (user.id) {
7212
7243
  localStorage.setItem('userId', user.id);
7213
7244
  }
@@ -7222,11 +7253,11 @@ const _excluded = ["callback", "error"],
7222
7253
  actions.setAuthState({
7223
7254
  isLoading: false
7224
7255
  });
7225
- if (loginState.flow === _interfaces__WEBPACK_IMPORTED_MODULE_6__.LoginFlow.Login) {
7256
+ if (loginState.flow === _interfaces__WEBPACK_IMPORTED_MODULE_7__.LoginFlow.Login) {
7226
7257
  const shouldShowPrompt = await actions.__shouldShowPromptPasskeys();
7227
7258
  if (shouldShowPrompt) {
7228
7259
  actions.setLoginState({
7229
- step: _interfaces__WEBPACK_IMPORTED_MODULE_6__.LoginStep.promptPasskeys,
7260
+ step: _interfaces__WEBPACK_IMPORTED_MODULE_7__.LoginStep.promptPasskeys,
7230
7261
  loading: false
7231
7262
  });
7232
7263
  onRedirectTo(routes.loginUrl, {
@@ -7236,12 +7267,12 @@ const _excluded = ["callback", "error"],
7236
7267
  actions.setAuthState({
7237
7268
  isAuthenticated: true
7238
7269
  });
7239
- if (_payload.type === _frontegg_rest_api__WEBPACK_IMPORTED_MODULE_14__.AuthStrategyEnum.MagicLink) {
7270
+ if (_payload.type === _frontegg_rest_api__WEBPACK_IMPORTED_MODULE_15__.AuthStrategyEnum.MagicLink) {
7240
7271
  actions.setLoginState({
7241
- step: _interfaces__WEBPACK_IMPORTED_MODULE_6__.LoginStep.magicLinkPostLoginSuccess,
7272
+ step: _interfaces__WEBPACK_IMPORTED_MODULE_7__.LoginStep.magicLinkPostLoginSuccess,
7242
7273
  loading: false
7243
7274
  });
7244
- await (0,_helpers__WEBPACK_IMPORTED_MODULE_10__.delay)(5000);
7275
+ await (0,_helpers__WEBPACK_IMPORTED_MODULE_11__.delay)(5000);
7245
7276
  }
7246
7277
  await actions.afterAuthNavigation();
7247
7278
  }
@@ -7255,7 +7286,7 @@ const _excluded = ["callback", "error"],
7255
7286
  }
7256
7287
  } catch (e) {
7257
7288
  setLoginState({
7258
- error: (0,_helpers__WEBPACK_IMPORTED_MODULE_15__.errorHandler)(e, 'Failed to authenticate')
7289
+ error: (0,_helpers__WEBPACK_IMPORTED_MODULE_16__.errorHandler)(e, 'Failed to authenticate')
7259
7290
  });
7260
7291
  callback == null ? void 0 : callback(null, e);
7261
7292
  } finally {
@@ -7279,7 +7310,7 @@ const _excluded = ["callback", "error"],
7279
7310
  });
7280
7311
  } catch (e) {
7281
7312
  setLoginState({
7282
- inviteTokenError: (0,_helpers__WEBPACK_IMPORTED_MODULE_15__.errorHandler)(e, `We couldn't verify your invitation`)
7313
+ inviteTokenError: (0,_helpers__WEBPACK_IMPORTED_MODULE_16__.errorHandler)(e, `We couldn't verify your invitation`)
7283
7314
  });
7284
7315
  } finally {
7285
7316
  setLoginState({
@@ -7315,7 +7346,7 @@ const _excluded = ["callback", "error"],
7315
7346
  callback == null ? void 0 : callback(options);
7316
7347
  } catch (e) {
7317
7348
  setLoginState({
7318
- error: (0,_helpers__WEBPACK_IMPORTED_MODULE_15__.errorHandler)(e)
7349
+ error: (0,_helpers__WEBPACK_IMPORTED_MODULE_16__.errorHandler)(e)
7319
7350
  });
7320
7351
  callback == null ? void 0 : callback(null);
7321
7352
  } finally {
@@ -7352,7 +7383,7 @@ const _excluded = ["callback", "error"],
7352
7383
  user
7353
7384
  } = _await$api$auth$webAu,
7354
7385
  rest = (0,_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__["default"])(_await$api$auth$webAu, _excluded9);
7355
- if ((0,_helpers__WEBPACK_IMPORTED_MODULE_5__.isMfaRequired)(user, store.root.appName)) {
7386
+ if ((0,_helpers__WEBPACK_IMPORTED_MODULE_6__.isMfaRequired)(user, store.root.appName)) {
7356
7387
  const {
7357
7388
  routes,
7358
7389
  onRedirectTo
@@ -7383,7 +7414,7 @@ const _excluded = ["callback", "error"],
7383
7414
  email: user.email,
7384
7415
  name: user.name
7385
7416
  };
7386
- (0,_helpers__WEBPACK_IMPORTED_MODULE_19__.reportGTMEvent)(_helpers__WEBPACK_IMPORTED_MODULE_19__.GTMEventAction.LOGIN_COMPLETED, loginCompletedPayload);
7417
+ (0,_helpers__WEBPACK_IMPORTED_MODULE_20__.reportGTMEvent)(_helpers__WEBPACK_IMPORTED_MODULE_20__.GTMEventAction.LOGIN_COMPLETED, loginCompletedPayload);
7387
7418
  await actions.afterAuthNavigation();
7388
7419
  // TODO: Itamar why moving callback to inside the else block
7389
7420
  callback == null ? void 0 : callback(true);
@@ -7391,7 +7422,7 @@ const _excluded = ["callback", "error"],
7391
7422
  // callback?.(true);
7392
7423
  } catch (e) {
7393
7424
  setLoginState({
7394
- error: (0,_helpers__WEBPACK_IMPORTED_MODULE_15__.errorHandler)(e)
7425
+ error: (0,_helpers__WEBPACK_IMPORTED_MODULE_16__.errorHandler)(e)
7395
7426
  });
7396
7427
  callback == null ? void 0 : callback(null);
7397
7428
  } finally {
@@ -7422,7 +7453,7 @@ const _excluded = ["callback", "error"],
7422
7453
  callback == null ? void 0 : callback(options);
7423
7454
  } catch (e) {
7424
7455
  setLoginState({
7425
- error: (0,_helpers__WEBPACK_IMPORTED_MODULE_15__.errorHandler)(e)
7456
+ error: (0,_helpers__WEBPACK_IMPORTED_MODULE_16__.errorHandler)(e)
7426
7457
  });
7427
7458
  callback == null ? void 0 : callback(null);
7428
7459
  } finally {
@@ -7441,7 +7472,7 @@ const _excluded = ["callback", "error"],
7441
7472
  loading: true
7442
7473
  });
7443
7474
  const publicKey = (0,_helpers__WEBPACK_IMPORTED_MODULE_24__.publicKeyCredentialToJSON)(body.publicKey);
7444
- const deviceType = (publicKey == null ? void 0 : publicKey.authenticatorAttachment) === 'platform' ? _frontegg_rest_api__WEBPACK_IMPORTED_MODULE_17__.WebAuthnDeviceType.Platform : _frontegg_rest_api__WEBPACK_IMPORTED_MODULE_17__.WebAuthnDeviceType.CrossPlatform;
7475
+ const deviceType = (publicKey == null ? void 0 : publicKey.authenticatorAttachment) === 'platform' ? _frontegg_rest_api__WEBPACK_IMPORTED_MODULE_18__.WebAuthnDeviceType.Platform : _frontegg_rest_api__WEBPACK_IMPORTED_MODULE_18__.WebAuthnDeviceType.CrossPlatform;
7445
7476
  await api.auth.verifyNewDeviceSession({
7446
7477
  id: publicKey.id,
7447
7478
  response: publicKey.response,
@@ -7450,7 +7481,7 @@ const _excluded = ["callback", "error"],
7450
7481
  callback == null ? void 0 : callback(true);
7451
7482
  } catch (e) {
7452
7483
  setLoginState({
7453
- error: (0,_helpers__WEBPACK_IMPORTED_MODULE_15__.errorHandler)(e)
7484
+ error: (0,_helpers__WEBPACK_IMPORTED_MODULE_16__.errorHandler)(e)
7454
7485
  });
7455
7486
  callback == null ? void 0 : callback(null);
7456
7487
  } finally {
@@ -7526,7 +7557,7 @@ const _excluded = ["callback", "error"],
7526
7557
  } catch (e) {
7527
7558
  setLoginState({
7528
7559
  loading: false,
7529
- error: (0,_helpers__WEBPACK_IMPORTED_MODULE_15__.errorHandler)(e)
7560
+ error: (0,_helpers__WEBPACK_IMPORTED_MODULE_16__.errorHandler)(e)
7530
7561
  });
7531
7562
  callback == null ? void 0 : callback(null);
7532
7563
  }
@@ -7552,7 +7583,7 @@ const _excluded = ["callback", "error"],
7552
7583
  } catch (e) {
7553
7584
  setLoginState({
7554
7585
  loading: false,
7555
- error: (0,_helpers__WEBPACK_IMPORTED_MODULE_15__.errorHandler)(e)
7586
+ error: (0,_helpers__WEBPACK_IMPORTED_MODULE_16__.errorHandler)(e)
7556
7587
  });
7557
7588
  callback == null ? void 0 : callback(null);
7558
7589
  }
@@ -7575,7 +7606,7 @@ const _excluded = ["callback", "error"],
7575
7606
  } catch (e) {
7576
7607
  setLoginState({
7577
7608
  loading: false,
7578
- error: (0,_helpers__WEBPACK_IMPORTED_MODULE_15__.errorHandler)(e)
7609
+ error: (0,_helpers__WEBPACK_IMPORTED_MODULE_16__.errorHandler)(e)
7579
7610
  });
7580
7611
  callback == null ? void 0 : callback(null);
7581
7612
  }
@@ -7602,7 +7633,7 @@ const _excluded = ["callback", "error"],
7602
7633
  } catch (e) {
7603
7634
  setLoginState({
7604
7635
  loading: false,
7605
- error: (0,_helpers__WEBPACK_IMPORTED_MODULE_15__.errorHandler)(e)
7636
+ error: (0,_helpers__WEBPACK_IMPORTED_MODULE_16__.errorHandler)(e)
7606
7637
  });
7607
7638
  callback == null ? void 0 : callback(null);
7608
7639
  }
@@ -7625,7 +7656,7 @@ const _excluded = ["callback", "error"],
7625
7656
  } catch (e) {
7626
7657
  setLoginState({
7627
7658
  loading: false,
7628
- error: (0,_helpers__WEBPACK_IMPORTED_MODULE_15__.errorHandler)(e)
7659
+ error: (0,_helpers__WEBPACK_IMPORTED_MODULE_16__.errorHandler)(e)
7629
7660
  });
7630
7661
  callback == null ? void 0 : callback(null);
7631
7662
  }
@@ -7665,7 +7696,7 @@ const _excluded = ["callback", "error"],
7665
7696
  setLoginState({
7666
7697
  loading: false,
7667
7698
  error: undefined,
7668
- step: _interfaces__WEBPACK_IMPORTED_MODULE_6__.LoginStep.breachedPasswordSuccess
7699
+ step: _interfaces__WEBPACK_IMPORTED_MODULE_7__.LoginStep.breachedPasswordSuccess
7669
7700
  });
7670
7701
  actions.setAuthState({
7671
7702
  isAuthenticated: false
@@ -7673,7 +7704,7 @@ const _excluded = ["callback", "error"],
7673
7704
  } catch (e) {
7674
7705
  setLoginState({
7675
7706
  loading: false,
7676
- error: (0,_helpers__WEBPACK_IMPORTED_MODULE_15__.errorHandler)(e)
7707
+ error: (0,_helpers__WEBPACK_IMPORTED_MODULE_16__.errorHandler)(e)
7677
7708
  });
7678
7709
  }
7679
7710
  };
@@ -7693,7 +7724,7 @@ const _excluded = ["callback", "error"],
7693
7724
  return;
7694
7725
  }
7695
7726
  try {
7696
- const tabTenantId = (0,_frontegg_rest_api__WEBPACK_IMPORTED_MODULE_3__.getTabTenantFromSessionStorage)(store.root.appName);
7727
+ const tabTenantId = (0,_frontegg_rest_api__WEBPACK_IMPORTED_MODULE_4__.getTabTenantFromSessionStorage)(store.root.appName);
7697
7728
  const body = (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__["default"])({
7698
7729
  grant_type: 'refresh_token',
7699
7730
  refresh_token: currentUser == null ? void 0 : currentUser.refreshToken
@@ -7728,8 +7759,8 @@ const _excluded = ["callback", "error"],
7728
7759
  user,
7729
7760
  tenants = [],
7730
7761
  activeTenant
7731
- } = await (0,_helpers__WEBPACK_IMPORTED_MODULE_4__.refreshTokenWithRetry)(() => api.auth.refreshTokenV3());
7732
- if ((0,_helpers__WEBPACK_IMPORTED_MODULE_5__.isMfaRequired)(user, store.root.appName)) {
7762
+ } = await (0,_helpers__WEBPACK_IMPORTED_MODULE_5__.refreshTokenWithRetry)(() => api.auth.refreshTokenV3());
7763
+ if ((0,_helpers__WEBPACK_IMPORTED_MODULE_6__.isMfaRequired)(user, store.root.appName)) {
7733
7764
  const mfaRequiredState = await actions.getMfaRequiredState(user);
7734
7765
  actions.setAuthState(mfaRequiredState);
7735
7766
  onRedirectTo(routes.loginUrl, {
@@ -7740,7 +7771,7 @@ const _excluded = ["callback", "error"],
7740
7771
  const shouldShowPrompt = await actions.__shouldShowPromptPasskeys();
7741
7772
  if (shouldShowPrompt) {
7742
7773
  actions.setLoginState({
7743
- step: _interfaces__WEBPACK_IMPORTED_MODULE_6__.LoginStep.promptPasskeys,
7774
+ step: _interfaces__WEBPACK_IMPORTED_MODULE_7__.LoginStep.promptPasskeys,
7744
7775
  loading: false
7745
7776
  });
7746
7777
  actions.afterAuthenticationStateUpdate({
@@ -7767,7 +7798,7 @@ const _excluded = ["callback", "error"],
7767
7798
  }, {
7768
7799
  loginState: (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__["default"])({}, loginState, {
7769
7800
  quickLoginToRegister,
7770
- flow: shouldNavigateToRegisterQuickLogin ? _interfaces__WEBPACK_IMPORTED_MODULE_6__.LoginFlow.RegisterQuickLogin : _interfaces__WEBPACK_IMPORTED_MODULE_6__.LoginFlow.Login
7801
+ flow: shouldNavigateToRegisterQuickLogin ? _interfaces__WEBPACK_IMPORTED_MODULE_7__.LoginFlow.RegisterQuickLogin : _interfaces__WEBPACK_IMPORTED_MODULE_7__.LoginFlow.Login
7771
7802
  }),
7772
7803
  isAuthenticated: true
7773
7804
  });
@@ -8524,7 +8555,8 @@ const _excluded = ["callback", "deviceId"],
8524
8555
  __webpack_require__.r(__webpack_exports__);
8525
8556
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
8526
8557
  /* harmony export */ authStrategyLoginStepMap: () => (/* binding */ authStrategyLoginStepMap),
8527
- /* harmony export */ defaultFronteggRoutes: () => (/* binding */ defaultFronteggRoutes)
8558
+ /* harmony export */ defaultFronteggRoutes: () => (/* binding */ defaultFronteggRoutes),
8559
+ /* harmony export */ defaultOnRedirectTo: () => (/* binding */ defaultOnRedirectTo)
8528
8560
  /* harmony export */ });
8529
8561
  /* harmony import */ var _frontegg_rest_api__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @frontegg/rest-api */ "../../dist/@frontegg/rest-api/auth/enums.js");
8530
8562
  /* harmony import */ var _interfaces__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./interfaces */ "../../dist/@frontegg/redux-store/auth/LoginState/interfaces.js");
@@ -8535,6 +8567,7 @@ __webpack_require__.r(__webpack_exports__);
8535
8567
  */
8536
8568
 
8537
8569
 
8570
+ const defaultOnRedirectTo = () => void 0;
8538
8571
  const authStrategyLoginStepMap = {
8539
8572
  [_frontegg_rest_api__WEBPACK_IMPORTED_MODULE_0__.AuthStrategyEnum.Code]: _interfaces__WEBPACK_IMPORTED_MODULE_1__.LoginStep.loginWithOtc,
8540
8573
  [_frontegg_rest_api__WEBPACK_IMPORTED_MODULE_0__.AuthStrategyEnum.EmailAndPassword]: _interfaces__WEBPACK_IMPORTED_MODULE_1__.LoginStep.loginWithPassword,
@@ -19104,7 +19137,7 @@ const createAuthState = _overrideState => {
19104
19137
  overrideState = (0,_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_1__["default"])(_ref, _excluded);
19105
19138
  return (0,_toolkit_proxy__WEBPACK_IMPORTED_MODULE_26__.createProxy)((0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({
19106
19139
  routes: (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({}, _LoginState_consts__WEBPACK_IMPORTED_MODULE_27__.defaultFronteggRoutes, routes),
19107
- onRedirectTo: () => void 0,
19140
+ onRedirectTo: _LoginState_consts__WEBPACK_IMPORTED_MODULE_27__.defaultOnRedirectTo,
19108
19141
  isAuthenticated: false,
19109
19142
  isLoading: true,
19110
19143
  isSSOAuth: false,
@@ -20032,7 +20065,8 @@ __webpack_require__.r(__webpack_exports__);
20032
20065
  /* harmony export */ SHOULD_STEP_UP_KEY: () => (/* reexport safe */ _auth_StepUpState_consts__WEBPACK_IMPORTED_MODULE_0__.SHOULD_STEP_UP_KEY),
20033
20066
  /* harmony export */ STEP_UP_MAX_AGE_PARAM_NAME: () => (/* reexport safe */ _auth_StepUpState_consts__WEBPACK_IMPORTED_MODULE_0__.STEP_UP_MAX_AGE_PARAM_NAME),
20034
20067
  /* harmony export */ authStrategyLoginStepMap: () => (/* reexport safe */ _auth_LoginState_consts__WEBPACK_IMPORTED_MODULE_1__.authStrategyLoginStepMap),
20035
- /* harmony export */ defaultFronteggRoutes: () => (/* reexport safe */ _auth_LoginState_consts__WEBPACK_IMPORTED_MODULE_1__.defaultFronteggRoutes)
20068
+ /* harmony export */ defaultFronteggRoutes: () => (/* reexport safe */ _auth_LoginState_consts__WEBPACK_IMPORTED_MODULE_1__.defaultFronteggRoutes),
20069
+ /* harmony export */ defaultOnRedirectTo: () => (/* reexport safe */ _auth_LoginState_consts__WEBPACK_IMPORTED_MODULE_1__.defaultOnRedirectTo)
20036
20070
  /* harmony export */ });
20037
20071
  /* harmony import */ var _auth_StepUpState_consts__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./auth/StepUpState/consts */ "../../dist/@frontegg/redux-store/auth/StepUpState/consts.js");
20038
20072
  /* harmony import */ var _auth_LoginState_consts__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./auth/LoginState/consts */ "../../dist/@frontegg/redux-store/auth/LoginState/consts.js");
@@ -21076,6 +21110,7 @@ __webpack_require__.r(__webpack_exports__);
21076
21110
  /* harmony export */ deepClone: () => (/* reexport safe */ _helpers__WEBPACK_IMPORTED_MODULE_2__.deepClone),
21077
21111
  /* harmony export */ deepResetState: () => (/* reexport safe */ _helpers__WEBPACK_IMPORTED_MODULE_2__.deepResetState),
21078
21112
  /* harmony export */ defaultFronteggRoutes: () => (/* reexport safe */ _constants__WEBPACK_IMPORTED_MODULE_1__.defaultFronteggRoutes),
21113
+ /* harmony export */ defaultOnRedirectTo: () => (/* reexport safe */ _constants__WEBPACK_IMPORTED_MODULE_1__.defaultOnRedirectTo),
21079
21114
  /* harmony export */ delay: () => (/* reexport safe */ _helpers__WEBPACK_IMPORTED_MODULE_2__.delay),
21080
21115
  /* harmony export */ errorHandler: () => (/* reexport safe */ _helpers__WEBPACK_IMPORTED_MODULE_2__.errorHandler),
21081
21116
  /* harmony export */ errorTraceId: () => (/* reexport safe */ _helpers__WEBPACK_IMPORTED_MODULE_2__.errorTraceId),
@@ -21148,7 +21183,7 @@ __webpack_require__.r(__webpack_exports__);
21148
21183
  /* harmony import */ var _subscriptions_interfaces__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./subscriptions/interfaces */ "../../dist/@frontegg/redux-store/subscriptions/interfaces.js");
21149
21184
  /* harmony import */ var _vendor__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./vendor */ "../../dist/@frontegg/redux-store/vendor/index.js");
21150
21185
  /* harmony import */ var _audits__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./audits */ "../../dist/@frontegg/redux-store/audits/index.js");
21151
- /** @license Frontegg v7.128.0
21186
+ /** @license Frontegg v7.129.0
21152
21187
  *
21153
21188
  * This source code is licensed under the MIT license found in the
21154
21189
  * LICENSE file in the root directory of this source tree.
@@ -31867,7 +31902,7 @@ __webpack_require__.r(__webpack_exports__);
31867
31902
  /* harmony import */ var _security_center_interfaces__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./security-center/interfaces */ "../../dist/@frontegg/rest-api/security-center/interfaces.js");
31868
31903
  /* harmony import */ var _applications_interfaces__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./applications/interfaces */ "../../dist/@frontegg/rest-api/applications/interfaces.js");
31869
31904
  /* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./constants */ "../../dist/@frontegg/rest-api/constants.js");
31870
- /** @license Frontegg v7.128.0
31905
+ /** @license Frontegg v7.129.0
31871
31906
  *
31872
31907
  * This source code is licensed under the MIT license found in the
31873
31908
  * LICENSE file in the root directory of this source tree.
@@ -34709,7 +34744,7 @@ __webpack_require__.r(__webpack_exports__);
34709
34744
  /* harmony export */ });
34710
34745
  /* harmony import */ var _ThemeOptions__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ThemeOptions */ "../../dist/@frontegg/types/ThemeOptions/index.js");
34711
34746
  /* harmony import */ var _Metadata__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Metadata */ "../../dist/@frontegg/types/Metadata/index.js");
34712
- /** @license Frontegg v7.128.0
34747
+ /** @license Frontegg v7.129.0
34713
34748
  *
34714
34749
  * This source code is licensed under the MIT license found in the
34715
34750
  * LICENSE file in the root directory of this source tree.