@frontegg/js 7.88.0 → 7.89.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.
@@ -1839,7 +1839,7 @@ __webpack_require__.r(__webpack_exports__);
1839
1839
  /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
1840
1840
  /* harmony export */ });
1841
1841
  /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
1842
- cdnVersion: '7.88.0'
1842
+ cdnVersion: '7.89.0'
1843
1843
  });
1844
1844
 
1845
1845
  /***/ }),
@@ -5723,34 +5723,35 @@ __webpack_require__.r(__webpack_exports__);
5723
5723
  /* harmony export */ });
5724
5724
  /* 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");
5725
5725
  /* 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");
5726
- /* harmony import */ var _afterAuthNavigation_actions__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./afterAuthNavigation.actions */ "../../dist/@frontegg/redux-store/auth/LoginState/actions/afterAuthNavigation.actions.js");
5727
- /* harmony import */ var _handleVerifyMFAResponse_actions__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./handleVerifyMFAResponse.actions */ "../../dist/@frontegg/redux-store/auth/LoginState/actions/handleVerifyMFAResponse.actions.js");
5728
- /* harmony import */ var _mfaRequiredState_actions__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./mfaRequiredState.actions */ "../../dist/@frontegg/redux-store/auth/LoginState/actions/mfaRequiredState.actions.js");
5729
- /* harmony import */ var _mfaWithAuthenticator_actions__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./mfaWithAuthenticator.actions */ "../../dist/@frontegg/redux-store/auth/LoginState/actions/mfaWithAuthenticator.actions.js");
5730
- /* harmony import */ var _mfaWithEmailCode_actions__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./mfaWithEmailCode.actions */ "../../dist/@frontegg/redux-store/auth/LoginState/actions/mfaWithEmailCode.actions.js");
5731
- /* harmony import */ var _mfaWithSMS_actions__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ./mfaWithSMS.actions */ "../../dist/@frontegg/redux-store/auth/LoginState/actions/mfaWithSMS.actions.js");
5732
- /* harmony import */ var _mfaWithWebAuthn_actions__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ./mfaWithWebAuthn.actions */ "../../dist/@frontegg/redux-store/auth/LoginState/actions/mfaWithWebAuthn.actions.js");
5726
+ /* harmony import */ var _afterAuthNavigation_actions__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./afterAuthNavigation.actions */ "../../dist/@frontegg/redux-store/auth/LoginState/actions/afterAuthNavigation.actions.js");
5727
+ /* harmony import */ var _handleVerifyMFAResponse_actions__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./handleVerifyMFAResponse.actions */ "../../dist/@frontegg/redux-store/auth/LoginState/actions/handleVerifyMFAResponse.actions.js");
5728
+ /* harmony import */ var _mfaRequiredState_actions__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./mfaRequiredState.actions */ "../../dist/@frontegg/redux-store/auth/LoginState/actions/mfaRequiredState.actions.js");
5729
+ /* harmony import */ var _mfaWithAuthenticator_actions__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./mfaWithAuthenticator.actions */ "../../dist/@frontegg/redux-store/auth/LoginState/actions/mfaWithAuthenticator.actions.js");
5730
+ /* harmony import */ var _mfaWithEmailCode_actions__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ./mfaWithEmailCode.actions */ "../../dist/@frontegg/redux-store/auth/LoginState/actions/mfaWithEmailCode.actions.js");
5731
+ /* harmony import */ var _mfaWithSMS_actions__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ./mfaWithSMS.actions */ "../../dist/@frontegg/redux-store/auth/LoginState/actions/mfaWithSMS.actions.js");
5732
+ /* harmony import */ var _mfaWithWebAuthn_actions__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ./mfaWithWebAuthn.actions */ "../../dist/@frontegg/redux-store/auth/LoginState/actions/mfaWithWebAuthn.actions.js");
5733
5733
  /* harmony import */ var _interfaces__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../interfaces */ "../../dist/@frontegg/redux-store/auth/LoginState/interfaces.js");
5734
- /* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../helpers */ "../../dist/@frontegg/redux-store/helpers/common.js");
5735
- /* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../../helpers */ "../../dist/@frontegg/redux-store/helpers/handlers.js");
5736
- /* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../../helpers */ "../../dist/@frontegg/redux-store/helpers/gtm.js");
5737
- /* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../../helpers */ "../../dist/@frontegg/redux-store/helpers/encoders.js");
5738
- /* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../../../helpers */ "../../dist/@frontegg/redux-store/helpers/converters.js");
5739
- /* harmony import */ var _state__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../state */ "../../dist/@frontegg/redux-store/auth/LoginState/state.js");
5740
- /* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../helpers */ "../../dist/@frontegg/redux-store/auth/LoginState/helpers.js");
5734
+ /* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../helpers */ "../../dist/@frontegg/redux-store/helpers/common.js");
5735
+ /* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../../helpers */ "../../dist/@frontegg/redux-store/helpers/handlers.js");
5736
+ /* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../../helpers */ "../../dist/@frontegg/redux-store/helpers/gtm.js");
5737
+ /* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../../../helpers */ "../../dist/@frontegg/redux-store/helpers/encoders.js");
5738
+ /* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../../../helpers */ "../../dist/@frontegg/redux-store/helpers/converters.js");
5739
+ /* harmony import */ var _state__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../state */ "../../dist/@frontegg/redux-store/auth/LoginState/state.js");
5740
+ /* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../helpers */ "../../dist/@frontegg/redux-store/auth/LoginState/helpers.js");
5741
5741
  /* harmony import */ var _frontegg_rest_api__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @frontegg/rest-api */ "../../dist/@frontegg/rest-api/ContextHolder/index.js");
5742
- /* harmony import */ var _frontegg_rest_api__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @frontegg/rest-api */ "../../dist/@frontegg/rest-api/auth/enums.js");
5743
- /* harmony import */ var _frontegg_rest_api__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! @frontegg/rest-api */ "../../dist/@frontegg/rest-api/auth/utils.js");
5744
- /* harmony import */ var _frontegg_rest_api__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! @frontegg/rest-api */ "../../dist/@frontegg/rest-api/auth/interfaces.js");
5745
- /* harmony import */ var _hostedLoginAuthorize_actions__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./hostedLoginAuthorize.actions */ "../../dist/@frontegg/redux-store/auth/LoginState/actions/hostedLoginAuthorize.actions.js");
5742
+ /* harmony import */ var _frontegg_rest_api__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @frontegg/rest-api */ "../../dist/@frontegg/rest-api/feature-flags/index.js");
5743
+ /* harmony import */ var _frontegg_rest_api__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @frontegg/rest-api */ "../../dist/@frontegg/rest-api/auth/enums.js");
5744
+ /* harmony import */ var _frontegg_rest_api__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! @frontegg/rest-api */ "../../dist/@frontegg/rest-api/auth/utils.js");
5745
+ /* harmony import */ var _frontegg_rest_api__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! @frontegg/rest-api */ "../../dist/@frontegg/rest-api/auth/interfaces.js");
5746
+ /* harmony import */ var _hostedLoginAuthorize_actions__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./hostedLoginAuthorize.actions */ "../../dist/@frontegg/redux-store/auth/LoginState/actions/hostedLoginAuthorize.actions.js");
5746
5747
  /* harmony import */ var _toolkit__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../toolkit */ "../../dist/@frontegg/redux-store/auth/Entitlements/helpers.js");
5747
- /* harmony import */ var _toolkit__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../../toolkit */ "../../dist/@frontegg/redux-store/toolkit/FronteggNativeModule.js");
5748
- /* harmony import */ var _interfaces__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../interfaces */ "../../dist/@frontegg/redux-store/auth/interfaces.js");
5749
- /* harmony import */ var _consts__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../consts */ "../../dist/@frontegg/redux-store/auth/LoginState/consts.js");
5748
+ /* harmony import */ var _toolkit__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../../toolkit */ "../../dist/@frontegg/redux-store/toolkit/FronteggNativeModule.js");
5749
+ /* harmony import */ var _interfaces__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../interfaces */ "../../dist/@frontegg/redux-store/auth/interfaces.js");
5750
+ /* harmony import */ var _consts__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../consts */ "../../dist/@frontegg/redux-store/auth/LoginState/consts.js");
5750
5751
  /* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../helpers */ "../../dist/@frontegg/redux-store/auth/helpers.js");
5751
- /* harmony import */ var _MfaState_interfaces__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../../MfaState/interfaces */ "../../dist/@frontegg/redux-store/auth/MfaState/interfaces.js");
5752
- /* harmony import */ var _SSOState_interfaces__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../SSOState/interfaces */ "../../dist/@frontegg/redux-store/auth/SSOState/interfaces.js");
5753
- /* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../constants */ "../../dist/@frontegg/redux-store/constants.js");
5752
+ /* harmony import */ var _MfaState_interfaces__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../../MfaState/interfaces */ "../../dist/@frontegg/redux-store/auth/MfaState/interfaces.js");
5753
+ /* harmony import */ var _SSOState_interfaces__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../SSOState/interfaces */ "../../dist/@frontegg/redux-store/auth/SSOState/interfaces.js");
5754
+ /* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../constants */ "../../dist/@frontegg/redux-store/constants.js");
5754
5755
 
5755
5756
 
5756
5757
  const _excluded = ["callback", "error"],
@@ -5872,7 +5873,9 @@ const _excluded = ["callback", "error"],
5872
5873
  }),
5873
5874
  isAuthenticated: true
5874
5875
  });
5875
- await __handleRedirectRefreshToken(shouldNavigateToRegisterQuickLogin);
5876
+ await __handleRedirectRefreshToken({
5877
+ shouldNavigateToRegisterQuickLogin
5878
+ });
5876
5879
  }
5877
5880
  } catch (e) {
5878
5881
  contextHolder.setAccessToken(null);
@@ -5915,9 +5918,11 @@ const _excluded = ["callback", "error"],
5915
5918
  }
5916
5919
  return updatedUser;
5917
5920
  };
5918
-
5919
5921
  /** @private */
5920
- const __handleRedirectRefreshToken = async shouldNavigateToRegisterQuickLogin => {
5922
+ const __handleRedirectRefreshToken = async ({
5923
+ shouldNavigateToRegisterQuickLogin,
5924
+ isSocialLoginRefreshToken = false
5925
+ }) => {
5921
5926
  var _window;
5922
5927
  const url = new URL((_window = window) == null ? void 0 : _window.location.href);
5923
5928
  const {
@@ -5925,6 +5930,7 @@ const _excluded = ["callback", "error"],
5925
5930
  loginState,
5926
5931
  onRedirectTo
5927
5932
  } = store.auth;
5933
+ const [preventAuthRedirectOnSocialLogin] = _frontegg_rest_api__WEBPACK_IMPORTED_MODULE_6__.FeatureFlags.getFeatureFlags(['prevent-auth-redirect-on-social-login'], store.root.appName);
5928
5934
  const invitationToken = url.searchParams.get('invitationToken');
5929
5935
  const redirectRoutes = [routes.socialLoginCallbackUrl, routes.oidcRedirectUrl, routes.samlCallbackUrl, routes.magicLinkCallbackUrl];
5930
5936
  if (!invitationToken) {
@@ -5938,6 +5944,10 @@ const _excluded = ["callback", "error"],
5938
5944
  refresh: routes.signUpSuccessUrl.startsWith('http')
5939
5945
  });
5940
5946
  } else {
5947
+ const isSocialLoginCallbackUrl = routes.socialLoginCallbackUrl && window.location.pathname.endsWith(routes.socialLoginCallbackUrl);
5948
+ if (!isSocialLoginRefreshToken && preventAuthRedirectOnSocialLogin && isSocialLoginCallbackUrl) {
5949
+ return;
5950
+ }
5941
5951
  await actions.afterAuthNavigation();
5942
5952
  }
5943
5953
  }
@@ -5949,7 +5959,7 @@ const _excluded = ["callback", "error"],
5949
5959
  var _payload$callback;
5950
5960
  const {
5951
5961
  isActive
5952
- } = await (0,_helpers__WEBPACK_IMPORTED_MODULE_6__.retryIfNeeded)(api.auth.getSSOPublicConfiguration, payload == null ? void 0 : payload.retryConfig);
5962
+ } = await (0,_helpers__WEBPACK_IMPORTED_MODULE_7__.retryIfNeeded)(api.auth.getSSOPublicConfiguration, payload == null ? void 0 : payload.retryConfig);
5953
5963
  actions.setAuthState({
5954
5964
  isSSOAuth: isActive
5955
5965
  });
@@ -5968,7 +5978,7 @@ const _excluded = ["callback", "error"],
5968
5978
  let ssoACS;
5969
5979
  try {
5970
5980
  var _metadata$configurati;
5971
- const metadata = await (0,_helpers__WEBPACK_IMPORTED_MODULE_6__.retryIfNeeded)(api.metadata.getSamlMetadata, payload == null ? void 0 : payload.retryConfig);
5981
+ const metadata = await (0,_helpers__WEBPACK_IMPORTED_MODULE_7__.retryIfNeeded)(api.metadata.getSamlMetadata, payload == null ? void 0 : payload.retryConfig);
5972
5982
  ssoACS = metadata == null ? void 0 : (_metadata$configurati = metadata.configuration) == null ? void 0 : _metadata$configurati.acsUrl;
5973
5983
  } catch (e) {
5974
5984
  console.error(e);
@@ -5995,7 +6005,7 @@ const _excluded = ["callback", "error"],
5995
6005
  routes
5996
6006
  } = store.auth;
5997
6007
  if ((0,_helpers__WEBPACK_IMPORTED_MODULE_3__.isMfaRequired)(user, store.root.appName)) {
5998
- const mfaRequiredState = await actions.getMfaRequiredState(user, _constants__WEBPACK_IMPORTED_MODULE_7__.DEFAULT_RETRY_CONFIG, true);
6008
+ const mfaRequiredState = await actions.getMfaRequiredState(user, _constants__WEBPACK_IMPORTED_MODULE_8__.DEFAULT_RETRY_CONFIG, true);
5999
6009
  actions.setAuthState(mfaRequiredState);
6000
6010
  onRedirectTo(routes.loginUrl, {
6001
6011
  preserveQueryParams: true
@@ -6006,17 +6016,17 @@ const _excluded = ["callback", "error"],
6006
6016
  Object.assign(store.auth.loginState, state);
6007
6017
  };
6008
6018
  const resetLoginState = () => {
6009
- (0,_helpers__WEBPACK_IMPORTED_MODULE_6__.deepResetState)(store, ['auth', 'loginState'], _state__WEBPACK_IMPORTED_MODULE_8__.initialState);
6019
+ (0,_helpers__WEBPACK_IMPORTED_MODULE_7__.deepResetState)(store, ['auth', 'loginState'], _state__WEBPACK_IMPORTED_MODULE_9__.initialState);
6010
6020
  };
6011
6021
  const getRetryWithBlockingCallbackPayload = requestName => {
6012
6022
  const callback = (_, error) => {
6013
6023
  if (!error || error.statusCode < 500) return;
6014
6024
  actions.setErrorByRequestName({
6015
6025
  requestName,
6016
- traceId: (0,_helpers__WEBPACK_IMPORTED_MODULE_6__.errorTraceId)(error)
6026
+ traceId: (0,_helpers__WEBPACK_IMPORTED_MODULE_7__.errorTraceId)(error)
6017
6027
  });
6018
6028
  };
6019
- return (0,_helpers__WEBPACK_IMPORTED_MODULE_6__.withRetryConfig)({
6029
+ return (0,_helpers__WEBPACK_IMPORTED_MODULE_7__.withRetryConfig)({
6020
6030
  callback
6021
6031
  });
6022
6032
  };
@@ -6028,19 +6038,19 @@ const _excluded = ["callback", "error"],
6028
6038
  actions.setAuthState({
6029
6039
  isLoading: true
6030
6040
  });
6031
- calls.push(actions.loadSocialLoginsConfigurationV2((0,_helpers__WEBPACK_IMPORTED_MODULE_6__.withRetryConfig)()));
6032
- calls.push(actions.loadAllowSignUps(getRetryWithBlockingCallbackPayload(_interfaces__WEBPACK_IMPORTED_MODULE_9__.REQUEST_NAME.LOAD_ALLOW_SIGNUPS)));
6033
- calls.push(actions.loadPublicAuthStrategiesPolicy(getRetryWithBlockingCallbackPayload(_interfaces__WEBPACK_IMPORTED_MODULE_9__.REQUEST_NAME.LOAD_PUBLIC_AUTH_STRATEGIES_POLICY)));
6041
+ calls.push(actions.loadSocialLoginsConfigurationV2((0,_helpers__WEBPACK_IMPORTED_MODULE_7__.withRetryConfig)()));
6042
+ calls.push(actions.loadAllowSignUps(getRetryWithBlockingCallbackPayload(_interfaces__WEBPACK_IMPORTED_MODULE_10__.REQUEST_NAME.LOAD_ALLOW_SIGNUPS)));
6043
+ calls.push(actions.loadPublicAuthStrategiesPolicy(getRetryWithBlockingCallbackPayload(_interfaces__WEBPACK_IMPORTED_MODULE_10__.REQUEST_NAME.LOAD_PUBLIC_AUTH_STRATEGIES_POLICY)));
6034
6044
  calls.push(actions.loadSignUpStrategies());
6035
- calls.push(__loadSSOPublicConfigurationFunction(getRetryWithBlockingCallbackPayload(_interfaces__WEBPACK_IMPORTED_MODULE_9__.REQUEST_NAME.LOAD_SSO_PUBLIC_CONFIGURATION)));
6036
- calls.push(actions.loadVendorPublicInfo((0,_helpers__WEBPACK_IMPORTED_MODULE_6__.withRetryConfig)()));
6037
- calls.push(__refreshMetadata((0,_helpers__WEBPACK_IMPORTED_MODULE_6__.withRetryConfig)()));
6045
+ calls.push(__loadSSOPublicConfigurationFunction(getRetryWithBlockingCallbackPayload(_interfaces__WEBPACK_IMPORTED_MODULE_10__.REQUEST_NAME.LOAD_SSO_PUBLIC_CONFIGURATION)));
6046
+ calls.push(actions.loadVendorPublicInfo((0,_helpers__WEBPACK_IMPORTED_MODULE_7__.withRetryConfig)()));
6047
+ calls.push(__refreshMetadata((0,_helpers__WEBPACK_IMPORTED_MODULE_7__.withRetryConfig)()));
6038
6048
  /*
6039
6049
  We will load custom login routes only if custom login is enabled
6040
6050
  to check if custom login is enabled without the tenant alias (search-param/subdomain)
6041
6051
  we have to wait for the user state (refreshToken request)
6042
6052
  */
6043
- callsAfterRefresh.push(actions.loadCustomLoginRoutes(getRetryWithBlockingCallbackPayload(_interfaces__WEBPACK_IMPORTED_MODULE_9__.REQUEST_NAME.LOAD_CUSTOM_LOGIN_ROUTES)));
6053
+ callsAfterRefresh.push(actions.loadCustomLoginRoutes(getRetryWithBlockingCallbackPayload(_interfaces__WEBPACK_IMPORTED_MODULE_10__.REQUEST_NAME.LOAD_CUSTOM_LOGIN_ROUTES)));
6044
6054
  }
6045
6055
  await Promise.all(calls);
6046
6056
  if (callsAfterRefresh.length > 0) {
@@ -6052,14 +6062,14 @@ const _excluded = ["callback", "error"],
6052
6062
  };
6053
6063
  const requestAuthorizeSSR = async payload => {
6054
6064
  const calls = [];
6055
- calls.push(actions.loadSocialLoginsConfigurationV2((0,_helpers__WEBPACK_IMPORTED_MODULE_6__.withRetryConfig)()));
6056
- calls.push(actions.loadAllowSignUps(getRetryWithBlockingCallbackPayload(_interfaces__WEBPACK_IMPORTED_MODULE_9__.REQUEST_NAME.LOAD_ALLOW_SIGNUPS)));
6057
- calls.push(__loadSSOPublicConfigurationFunction(getRetryWithBlockingCallbackPayload(_interfaces__WEBPACK_IMPORTED_MODULE_9__.REQUEST_NAME.LOAD_SSO_PUBLIC_CONFIGURATION)));
6065
+ calls.push(actions.loadSocialLoginsConfigurationV2((0,_helpers__WEBPACK_IMPORTED_MODULE_7__.withRetryConfig)()));
6066
+ calls.push(actions.loadAllowSignUps(getRetryWithBlockingCallbackPayload(_interfaces__WEBPACK_IMPORTED_MODULE_10__.REQUEST_NAME.LOAD_ALLOW_SIGNUPS)));
6067
+ calls.push(__loadSSOPublicConfigurationFunction(getRetryWithBlockingCallbackPayload(_interfaces__WEBPACK_IMPORTED_MODULE_10__.REQUEST_NAME.LOAD_SSO_PUBLIC_CONFIGURATION)));
6058
6068
  calls.push(actions.loadSignUpStrategies());
6059
- calls.push(actions.loadVendorPublicInfo((0,_helpers__WEBPACK_IMPORTED_MODULE_6__.withRetryConfig)()));
6069
+ calls.push(actions.loadVendorPublicInfo((0,_helpers__WEBPACK_IMPORTED_MODULE_7__.withRetryConfig)()));
6060
6070
  calls.push(__refreshMetadata());
6061
6071
  calls.push(__isMFARequiredSSR(payload));
6062
- calls.push(actions.loadCustomLoginRoutes(getRetryWithBlockingCallbackPayload(_interfaces__WEBPACK_IMPORTED_MODULE_9__.REQUEST_NAME.LOAD_CUSTOM_LOGIN_ROUTES)));
6072
+ calls.push(actions.loadCustomLoginRoutes(getRetryWithBlockingCallbackPayload(_interfaces__WEBPACK_IMPORTED_MODULE_10__.REQUEST_NAME.LOAD_CUSTOM_LOGIN_ROUTES)));
6063
6073
  await Promise.all(calls);
6064
6074
  };
6065
6075
  const ssoPreloginFailed = async _ref3 => {
@@ -6077,13 +6087,13 @@ const _excluded = ["callback", "error"],
6077
6087
  callback == null ? void 0 : callback();
6078
6088
  return;
6079
6089
  }
6080
- if ((publicPolicy == null ? void 0 : publicPolicy.authStrategy) === _frontegg_rest_api__WEBPACK_IMPORTED_MODULE_10__.AuthStrategyEnum.EmailAndPassword) {
6090
+ if ((publicPolicy == null ? void 0 : publicPolicy.authStrategy) === _frontegg_rest_api__WEBPACK_IMPORTED_MODULE_11__.AuthStrategyEnum.EmailAndPassword) {
6081
6091
  actions.setLoginState({
6082
6092
  step: _interfaces__WEBPACK_IMPORTED_MODULE_4__.LoginStep.loginWithPassword,
6083
6093
  loading: false
6084
6094
  });
6085
6095
  callback == null ? void 0 : callback();
6086
- } else if ([_frontegg_rest_api__WEBPACK_IMPORTED_MODULE_10__.AuthStrategyEnum.MagicLink, _frontegg_rest_api__WEBPACK_IMPORTED_MODULE_10__.AuthStrategyEnum.Code, _frontegg_rest_api__WEBPACK_IMPORTED_MODULE_10__.AuthStrategyEnum.SmsCode].includes(publicPolicy == null ? void 0 : publicPolicy.authStrategy)) {
6096
+ } else if ([_frontegg_rest_api__WEBPACK_IMPORTED_MODULE_11__.AuthStrategyEnum.MagicLink, _frontegg_rest_api__WEBPACK_IMPORTED_MODULE_11__.AuthStrategyEnum.Code, _frontegg_rest_api__WEBPACK_IMPORTED_MODULE_11__.AuthStrategyEnum.SmsCode].includes(publicPolicy == null ? void 0 : publicPolicy.authStrategy)) {
6087
6097
  await actions.passwordlessPreLogin((0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__["default"])({}, body, {
6088
6098
  type: publicPolicy == null ? void 0 : publicPolicy.authStrategy,
6089
6099
  callback
@@ -6092,7 +6102,7 @@ const _excluded = ["callback", "error"],
6092
6102
  actions.setLoginState({
6093
6103
  step: _interfaces__WEBPACK_IMPORTED_MODULE_4__.LoginStep.loginWithPassword,
6094
6104
  loading: false,
6095
- error: (0,_helpers__WEBPACK_IMPORTED_MODULE_11__.errorHandler)(error)
6105
+ error: (0,_helpers__WEBPACK_IMPORTED_MODULE_12__.errorHandler)(error)
6096
6106
  });
6097
6107
  callback == null ? void 0 : callback();
6098
6108
  }
@@ -6110,7 +6120,7 @@ const _excluded = ["callback", "error"],
6110
6120
  });
6111
6121
  try {
6112
6122
  const onRedirectTo = store.auth.onRedirectTo;
6113
- const tenantId = (0,_helpers__WEBPACK_IMPORTED_MODULE_12__.getSearchParam)(_helpers__WEBPACK_IMPORTED_MODULE_12__.TENANT_ID_PARAM_KEY);
6123
+ const tenantId = (0,_helpers__WEBPACK_IMPORTED_MODULE_13__.getSearchParam)(_helpers__WEBPACK_IMPORTED_MODULE_13__.TENANT_ID_PARAM_KEY);
6114
6124
  const preLoginResult = await api.auth.preLoginV2((0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__["default"])({}, email ? {
6115
6125
  email
6116
6126
  } : {}, username ? {
@@ -6124,15 +6134,15 @@ const _excluded = ["callback", "error"],
6124
6134
  } = preLoginResult != null ? preLoginResult : {};
6125
6135
  if (address) {
6126
6136
  let ssoRedirectUrl = address;
6127
- if (idpType === _SSOState_interfaces__WEBPACK_IMPORTED_MODULE_13__.SamlVendors.Oidc && !ssoRedirectUrl.includes('redirect_uri')) {
6137
+ if (idpType === _SSOState_interfaces__WEBPACK_IMPORTED_MODULE_14__.SamlVendors.Oidc && !ssoRedirectUrl.includes('redirect_uri')) {
6128
6138
  const {
6129
6139
  oidcRedirectUrl
6130
6140
  } = store.auth.routes;
6131
6141
  ssoRedirectUrl += `&redirect_uri=${window.location.origin}${oidcRedirectUrl}`;
6132
6142
  }
6133
- if (_toolkit__WEBPACK_IMPORTED_MODULE_14__["default"].isLoginWithSSOAvailable()) {
6143
+ if (_toolkit__WEBPACK_IMPORTED_MODULE_15__["default"].isLoginWithSSOAvailable()) {
6134
6144
  var _ref4;
6135
- _toolkit__WEBPACK_IMPORTED_MODULE_14__["default"].loginWithSSO((_ref4 = email != null ? email : username) != null ? _ref4 : '');
6145
+ _toolkit__WEBPACK_IMPORTED_MODULE_15__["default"].loginWithSSO((_ref4 = email != null ? email : username) != null ? _ref4 : '');
6136
6146
  setLoginState({
6137
6147
  loading: false
6138
6148
  });
@@ -6225,7 +6235,7 @@ const _excluded = ["callback", "error"],
6225
6235
  routes
6226
6236
  } = store.auth;
6227
6237
  if ((0,_helpers__WEBPACK_IMPORTED_MODULE_3__.isMfaRequired)(user, store.root.appName)) {
6228
- const mfaRequiredState = await actions.getMfaRequiredState(user, _constants__WEBPACK_IMPORTED_MODULE_7__.DEFAULT_RETRY_CONFIG, true, email);
6238
+ const mfaRequiredState = await actions.getMfaRequiredState(user, _constants__WEBPACK_IMPORTED_MODULE_8__.DEFAULT_RETRY_CONFIG, true, email);
6229
6239
  actions.setAuthState(mfaRequiredState);
6230
6240
  onRedirectTo(routes.loginUrl, {
6231
6241
  preserveQueryParams: true
@@ -6272,7 +6282,7 @@ const _excluded = ["callback", "error"],
6272
6282
  });
6273
6283
  } else {
6274
6284
  if (isAuthenticated) {
6275
- const shouldShowPasswordRotationPrompt = (0,_helpers__WEBPACK_IMPORTED_MODULE_12__.shouldShowPasswordRotationPromptFunc)(user);
6285
+ const shouldShowPasswordRotationPrompt = (0,_helpers__WEBPACK_IMPORTED_MODULE_13__.shouldShowPasswordRotationPromptFunc)(user);
6276
6286
  if (shouldShowPasswordRotationPrompt) {
6277
6287
  setLoginState({
6278
6288
  step: _interfaces__WEBPACK_IMPORTED_MODULE_4__.LoginStep.passwordRotationNotification,
@@ -6297,8 +6307,8 @@ const _excluded = ["callback", "error"],
6297
6307
  }
6298
6308
  }
6299
6309
  }
6300
- if (_toolkit__WEBPACK_IMPORTED_MODULE_14__["default"].isSuggestSavePasswordAvailable()) {
6301
- _toolkit__WEBPACK_IMPORTED_MODULE_14__["default"].suggestSavePassword(email, password);
6310
+ if (_toolkit__WEBPACK_IMPORTED_MODULE_15__["default"].isSuggestSavePasswordAvailable()) {
6311
+ _toolkit__WEBPACK_IMPORTED_MODULE_15__["default"].suggestSavePassword(email, password);
6302
6312
  }
6303
6313
 
6304
6314
  // TODO: extract item name to constants
@@ -6310,7 +6320,7 @@ const _excluded = ["callback", "error"],
6310
6320
  callback == null ? void 0 : callback(false, e);
6311
6321
  setLoginState({
6312
6322
  email,
6313
- error: (0,_helpers__WEBPACK_IMPORTED_MODULE_11__.errorHandler)(e),
6323
+ error: (0,_helpers__WEBPACK_IMPORTED_MODULE_12__.errorHandler)(e),
6314
6324
  loading: false
6315
6325
  });
6316
6326
  }
@@ -6330,7 +6340,7 @@ const _excluded = ["callback", "error"],
6330
6340
  /* empty */
6331
6341
  }
6332
6342
  if (contextHolder.isSessionPerTenantEnabled()) {
6333
- (0,_frontegg_rest_api__WEBPACK_IMPORTED_MODULE_15__.removeTabTenantFromSessionStorage)();
6343
+ (0,_frontegg_rest_api__WEBPACK_IMPORTED_MODULE_16__.removeTabTenantFromSessionStorage)();
6334
6344
  }
6335
6345
  actions.resetAuthState();
6336
6346
  await actions.requestAuthorize(true);
@@ -6344,7 +6354,7 @@ const _excluded = ["callback", "error"],
6344
6354
  /* empty */
6345
6355
  }
6346
6356
  if (contextHolder.isSessionPerTenantEnabled()) {
6347
- (0,_frontegg_rest_api__WEBPACK_IMPORTED_MODULE_15__.removeTabTenantFromSessionStorage)();
6357
+ (0,_frontegg_rest_api__WEBPACK_IMPORTED_MODULE_16__.removeTabTenantFromSessionStorage)();
6348
6358
  }
6349
6359
  setTimeout(() => {
6350
6360
  var _payload$callback3;
@@ -6371,7 +6381,7 @@ const _excluded = ["callback", "error"],
6371
6381
  } catch (e) {
6372
6382
  var _payload$callback5;
6373
6383
  setLoginState({
6374
- error: (0,_helpers__WEBPACK_IMPORTED_MODULE_11__.errorHandler)(e),
6384
+ error: (0,_helpers__WEBPACK_IMPORTED_MODULE_12__.errorHandler)(e),
6375
6385
  loading: false
6376
6386
  });
6377
6387
  (_payload$callback5 = payload.callback) == null ? void 0 : _payload$callback5.call(payload, false, e);
@@ -6390,7 +6400,7 @@ const _excluded = ["callback", "error"],
6390
6400
  // TODO: fix @frontegg/rest-api return value
6391
6401
  // @ts-ignore
6392
6402
  const preloginRes = await api.auth.passwordlessPreLogin((0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__["default"])({}, payload, {
6393
- type: _frontegg_rest_api__WEBPACK_IMPORTED_MODULE_10__.AuthStrategyEnum.SmsCode
6403
+ type: _frontegg_rest_api__WEBPACK_IMPORTED_MODULE_11__.AuthStrategyEnum.SmsCode
6394
6404
  }));
6395
6405
  setLoginState({
6396
6406
  step: _interfaces__WEBPACK_IMPORTED_MODULE_4__.LoginStep.loginWithQuickSmsOtc,
@@ -6401,7 +6411,7 @@ const _excluded = ["callback", "error"],
6401
6411
  callback == null ? void 0 : callback(true);
6402
6412
  } catch (e) {
6403
6413
  setLoginState({
6404
- error: (0,_helpers__WEBPACK_IMPORTED_MODULE_11__.errorHandler)(e),
6414
+ error: (0,_helpers__WEBPACK_IMPORTED_MODULE_12__.errorHandler)(e),
6405
6415
  loading: false
6406
6416
  });
6407
6417
  callback == null ? void 0 : callback(false, e);
@@ -6427,7 +6437,7 @@ const _excluded = ["callback", "error"],
6427
6437
  callback == null ? void 0 : callback(true);
6428
6438
  } catch (e) {
6429
6439
  setLoginState({
6430
- error: (0,_helpers__WEBPACK_IMPORTED_MODULE_11__.errorHandler)(e),
6440
+ error: (0,_helpers__WEBPACK_IMPORTED_MODULE_12__.errorHandler)(e),
6431
6441
  loading: false
6432
6442
  });
6433
6443
  }
@@ -6448,7 +6458,7 @@ const _excluded = ["callback", "error"],
6448
6458
  callback == null ? void 0 : callback(true);
6449
6459
  } catch (e) {
6450
6460
  setLoginState({
6451
- error: (0,_helpers__WEBPACK_IMPORTED_MODULE_11__.errorHandler)(e),
6461
+ error: (0,_helpers__WEBPACK_IMPORTED_MODULE_12__.errorHandler)(e),
6452
6462
  loading: false
6453
6463
  });
6454
6464
  }
@@ -6464,11 +6474,11 @@ const _excluded = ["callback", "error"],
6464
6474
  loading: true
6465
6475
  });
6466
6476
  let email;
6467
- if ((0,_helpers__WEBPACK_IMPORTED_MODULE_12__.isEmailPayload)(payload)) {
6477
+ if ((0,_helpers__WEBPACK_IMPORTED_MODULE_13__.isEmailPayload)(payload)) {
6468
6478
  email = payload.email;
6469
6479
  }
6470
6480
  let username;
6471
- if ((0,_helpers__WEBPACK_IMPORTED_MODULE_12__.isUsernamePayload)(payload)) {
6481
+ if ((0,_helpers__WEBPACK_IMPORTED_MODULE_13__.isUsernamePayload)(payload)) {
6472
6482
  username = payload.username;
6473
6483
  }
6474
6484
  // TODO: [Typescript 4.8] fix @frontegg/rest-api return value
@@ -6478,7 +6488,7 @@ const _excluded = ["callback", "error"],
6478
6488
  username: (_username = username) != null ? _username : ''
6479
6489
  }));
6480
6490
  // @ts-ignore
6481
- const step = _consts__WEBPACK_IMPORTED_MODULE_16__.authStrategyLoginStepMap[payload.type];
6491
+ const step = _consts__WEBPACK_IMPORTED_MODULE_17__.authStrategyLoginStepMap[payload.type];
6482
6492
  setLoginState({
6483
6493
  step,
6484
6494
  loading: false,
@@ -6489,7 +6499,7 @@ const _excluded = ["callback", "error"],
6489
6499
  callback == null ? void 0 : callback();
6490
6500
  } catch (e) {
6491
6501
  setLoginState({
6492
- error: (0,_helpers__WEBPACK_IMPORTED_MODULE_11__.errorHandler)(e),
6502
+ error: (0,_helpers__WEBPACK_IMPORTED_MODULE_12__.errorHandler)(e),
6493
6503
  loading: false
6494
6504
  });
6495
6505
  callback == null ? void 0 : callback(null, e);
@@ -6526,14 +6536,14 @@ const _excluded = ["callback", "error"],
6526
6536
  var _events$userVerified;
6527
6537
  const userVerifiedPayload = {
6528
6538
  email: user.email,
6529
- origin: _interfaces__WEBPACK_IMPORTED_MODULE_9__.UserVerifiedOriginTypes.PASSWORDLESS,
6539
+ origin: _interfaces__WEBPACK_IMPORTED_MODULE_10__.UserVerifiedOriginTypes.PASSWORDLESS,
6530
6540
  id: user.id,
6531
6541
  tenantId: user.tenantId,
6532
6542
  createdAt: new Date(),
6533
6543
  name: user.name
6534
6544
  };
6535
6545
  events == null ? void 0 : (_events$userVerified = events.userVerified) == null ? void 0 : _events$userVerified.call(events, userVerifiedPayload);
6536
- (0,_helpers__WEBPACK_IMPORTED_MODULE_17__.reportGTMEvent)(_helpers__WEBPACK_IMPORTED_MODULE_17__.GTMEventAction.USER_VERIFIED, userVerifiedPayload);
6546
+ (0,_helpers__WEBPACK_IMPORTED_MODULE_18__.reportGTMEvent)(_helpers__WEBPACK_IMPORTED_MODULE_18__.GTMEventAction.USER_VERIFIED, userVerifiedPayload);
6537
6547
  }
6538
6548
  if (user.id) {
6539
6549
  localStorage.setItem('userId', user.id);
@@ -6563,12 +6573,12 @@ const _excluded = ["callback", "error"],
6563
6573
  actions.setAuthState({
6564
6574
  isAuthenticated: true
6565
6575
  });
6566
- if (_payload.type === _frontegg_rest_api__WEBPACK_IMPORTED_MODULE_10__.AuthStrategyEnum.MagicLink) {
6576
+ if (_payload.type === _frontegg_rest_api__WEBPACK_IMPORTED_MODULE_11__.AuthStrategyEnum.MagicLink) {
6567
6577
  actions.setLoginState({
6568
6578
  step: _interfaces__WEBPACK_IMPORTED_MODULE_4__.LoginStep.magicLinkPostLoginSuccess,
6569
6579
  loading: false
6570
6580
  });
6571
- await (0,_helpers__WEBPACK_IMPORTED_MODULE_6__.delay)(5000);
6581
+ await (0,_helpers__WEBPACK_IMPORTED_MODULE_7__.delay)(5000);
6572
6582
  }
6573
6583
  await actions.afterAuthNavigation();
6574
6584
  }
@@ -6582,7 +6592,7 @@ const _excluded = ["callback", "error"],
6582
6592
  }
6583
6593
  } catch (e) {
6584
6594
  setLoginState({
6585
- error: (0,_helpers__WEBPACK_IMPORTED_MODULE_11__.errorHandler)(e, 'Failed to authenticate')
6595
+ error: (0,_helpers__WEBPACK_IMPORTED_MODULE_12__.errorHandler)(e, 'Failed to authenticate')
6586
6596
  });
6587
6597
  callback == null ? void 0 : callback(null, e);
6588
6598
  } finally {
@@ -6606,7 +6616,7 @@ const _excluded = ["callback", "error"],
6606
6616
  });
6607
6617
  } catch (e) {
6608
6618
  setLoginState({
6609
- inviteTokenError: (0,_helpers__WEBPACK_IMPORTED_MODULE_11__.errorHandler)(e, `We couldn't verify your invitation`)
6619
+ inviteTokenError: (0,_helpers__WEBPACK_IMPORTED_MODULE_12__.errorHandler)(e, `We couldn't verify your invitation`)
6610
6620
  });
6611
6621
  } finally {
6612
6622
  setLoginState({
@@ -6632,9 +6642,9 @@ const _excluded = ["callback", "error"],
6632
6642
  const {
6633
6643
  options
6634
6644
  } = await api.auth.webAuthnPreLogin(body);
6635
- options.challenge = (0,_helpers__WEBPACK_IMPORTED_MODULE_18__.base64urlDecode)(options.challenge);
6645
+ options.challenge = (0,_helpers__WEBPACK_IMPORTED_MODULE_19__.base64urlDecode)(options.challenge);
6636
6646
  options.allowCredentials = (_options$allowCredent = options.allowCredentials) == null ? void 0 : _options$allowCredent.map(credentials => (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__["default"])({}, credentials, {
6637
- id: (0,_helpers__WEBPACK_IMPORTED_MODULE_18__.base64urlDecode)(credentials.id)
6647
+ id: (0,_helpers__WEBPACK_IMPORTED_MODULE_19__.base64urlDecode)(credentials.id)
6638
6648
  }));
6639
6649
  setLoginState({
6640
6650
  error: undefined
@@ -6642,7 +6652,7 @@ const _excluded = ["callback", "error"],
6642
6652
  callback == null ? void 0 : callback(options);
6643
6653
  } catch (e) {
6644
6654
  setLoginState({
6645
- error: (0,_helpers__WEBPACK_IMPORTED_MODULE_11__.errorHandler)(e)
6655
+ error: (0,_helpers__WEBPACK_IMPORTED_MODULE_12__.errorHandler)(e)
6646
6656
  });
6647
6657
  callback == null ? void 0 : callback(null);
6648
6658
  } finally {
@@ -6667,7 +6677,7 @@ const _excluded = ["callback", "error"],
6667
6677
  setLoginState({
6668
6678
  loading: true
6669
6679
  });
6670
- const publicKey = (0,_helpers__WEBPACK_IMPORTED_MODULE_19__.publicKeyCredentialToJSON)(body.publicKey);
6680
+ const publicKey = (0,_helpers__WEBPACK_IMPORTED_MODULE_20__.publicKeyCredentialToJSON)(body.publicKey);
6671
6681
  const _await$api$auth$webAu = await api.auth.webAuthnPostLoginV2((0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__["default"])({}, publicKey, {
6672
6682
  response: (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__["default"])({}, publicKey.response, {
6673
6683
  userHandle: (_publicKey$response$u = publicKey.response.userHandle) != null ? _publicKey$response$u : undefined
@@ -6708,7 +6718,7 @@ const _excluded = ["callback", "error"],
6708
6718
  // callback?.(true);
6709
6719
  } catch (e) {
6710
6720
  setLoginState({
6711
- error: (0,_helpers__WEBPACK_IMPORTED_MODULE_11__.errorHandler)(e)
6721
+ error: (0,_helpers__WEBPACK_IMPORTED_MODULE_12__.errorHandler)(e)
6712
6722
  });
6713
6723
  callback == null ? void 0 : callback(null);
6714
6724
  } finally {
@@ -6733,13 +6743,13 @@ const _excluded = ["callback", "error"],
6733
6743
  const {
6734
6744
  options
6735
6745
  } = await api.auth.webAuthnCreateNewDeviceSession();
6736
- options.user.id = (0,_helpers__WEBPACK_IMPORTED_MODULE_18__.base64urlDecode)(options.user.id);
6737
- options.challenge = (0,_helpers__WEBPACK_IMPORTED_MODULE_18__.base64urlDecode)(options.challenge);
6746
+ options.user.id = (0,_helpers__WEBPACK_IMPORTED_MODULE_19__.base64urlDecode)(options.user.id);
6747
+ options.challenge = (0,_helpers__WEBPACK_IMPORTED_MODULE_19__.base64urlDecode)(options.challenge);
6738
6748
  options.excludeCredentials = [];
6739
6749
  callback == null ? void 0 : callback(options);
6740
6750
  } catch (e) {
6741
6751
  setLoginState({
6742
- error: (0,_helpers__WEBPACK_IMPORTED_MODULE_11__.errorHandler)(e)
6752
+ error: (0,_helpers__WEBPACK_IMPORTED_MODULE_12__.errorHandler)(e)
6743
6753
  });
6744
6754
  callback == null ? void 0 : callback(null);
6745
6755
  } finally {
@@ -6757,8 +6767,8 @@ const _excluded = ["callback", "error"],
6757
6767
  setLoginState({
6758
6768
  loading: true
6759
6769
  });
6760
- const publicKey = (0,_helpers__WEBPACK_IMPORTED_MODULE_19__.publicKeyCredentialToJSON)(body.publicKey);
6761
- const deviceType = (publicKey == null ? void 0 : publicKey.authenticatorAttachment) === 'platform' ? _frontegg_rest_api__WEBPACK_IMPORTED_MODULE_20__.WebAuthnDeviceType.Platform : _frontegg_rest_api__WEBPACK_IMPORTED_MODULE_20__.WebAuthnDeviceType.CrossPlatform;
6770
+ const publicKey = (0,_helpers__WEBPACK_IMPORTED_MODULE_20__.publicKeyCredentialToJSON)(body.publicKey);
6771
+ const deviceType = (publicKey == null ? void 0 : publicKey.authenticatorAttachment) === 'platform' ? _frontegg_rest_api__WEBPACK_IMPORTED_MODULE_21__.WebAuthnDeviceType.Platform : _frontegg_rest_api__WEBPACK_IMPORTED_MODULE_21__.WebAuthnDeviceType.CrossPlatform;
6762
6772
  await api.auth.verifyNewDeviceSession({
6763
6773
  id: publicKey.id,
6764
6774
  response: publicKey.response,
@@ -6767,7 +6777,7 @@ const _excluded = ["callback", "error"],
6767
6777
  callback == null ? void 0 : callback(true);
6768
6778
  } catch (e) {
6769
6779
  setLoginState({
6770
- error: (0,_helpers__WEBPACK_IMPORTED_MODULE_11__.errorHandler)(e)
6780
+ error: (0,_helpers__WEBPACK_IMPORTED_MODULE_12__.errorHandler)(e)
6771
6781
  });
6772
6782
  callback == null ? void 0 : callback(null);
6773
6783
  } finally {
@@ -6825,12 +6835,12 @@ const _excluded = ["callback", "error"],
6825
6835
  var _data$options$exclude;
6826
6836
  const data = await api.auth.preEnrollMFAWebAuthnForLogin(payload);
6827
6837
  const options = (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__["default"])({}, data.options, {
6828
- challenge: (0,_helpers__WEBPACK_IMPORTED_MODULE_18__.base64urlDecode)(data.options.challenge),
6838
+ challenge: (0,_helpers__WEBPACK_IMPORTED_MODULE_19__.base64urlDecode)(data.options.challenge),
6829
6839
  user: (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__["default"])({}, data.options.user, {
6830
- id: (0,_helpers__WEBPACK_IMPORTED_MODULE_18__.base64urlDecode)(data.options.user.id)
6840
+ id: (0,_helpers__WEBPACK_IMPORTED_MODULE_19__.base64urlDecode)(data.options.user.id)
6831
6841
  }),
6832
6842
  excludeCredentials: (_data$options$exclude = data.options.excludeCredentials) == null ? void 0 : _data$options$exclude.map(credentials => (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__["default"])({}, credentials, {
6833
- id: (0,_helpers__WEBPACK_IMPORTED_MODULE_18__.base64urlDecode)(credentials.id)
6843
+ id: (0,_helpers__WEBPACK_IMPORTED_MODULE_19__.base64urlDecode)(credentials.id)
6834
6844
  }))
6835
6845
  });
6836
6846
  setLoginState({
@@ -6843,7 +6853,7 @@ const _excluded = ["callback", "error"],
6843
6853
  } catch (e) {
6844
6854
  setLoginState({
6845
6855
  loading: false,
6846
- error: (0,_helpers__WEBPACK_IMPORTED_MODULE_11__.errorHandler)(e)
6856
+ error: (0,_helpers__WEBPACK_IMPORTED_MODULE_12__.errorHandler)(e)
6847
6857
  });
6848
6858
  callback == null ? void 0 : callback(null);
6849
6859
  }
@@ -6857,7 +6867,7 @@ const _excluded = ["callback", "error"],
6857
6867
  loading: true
6858
6868
  });
6859
6869
  try {
6860
- const publicKey = (0,_helpers__WEBPACK_IMPORTED_MODULE_19__.publicKeyCredentialToJSON)(payload.publicKey);
6870
+ const publicKey = (0,_helpers__WEBPACK_IMPORTED_MODULE_20__.publicKeyCredentialToJSON)(payload.publicKey);
6861
6871
  const data = await api.auth.enrollMFAWebAuthnForLoginV2((0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__["default"])({}, payload, {
6862
6872
  options: publicKey
6863
6873
  }));
@@ -6869,7 +6879,7 @@ const _excluded = ["callback", "error"],
6869
6879
  } catch (e) {
6870
6880
  setLoginState({
6871
6881
  loading: false,
6872
- error: (0,_helpers__WEBPACK_IMPORTED_MODULE_11__.errorHandler)(e)
6882
+ error: (0,_helpers__WEBPACK_IMPORTED_MODULE_12__.errorHandler)(e)
6873
6883
  });
6874
6884
  callback == null ? void 0 : callback(null);
6875
6885
  }
@@ -6892,7 +6902,7 @@ const _excluded = ["callback", "error"],
6892
6902
  } catch (e) {
6893
6903
  setLoginState({
6894
6904
  loading: false,
6895
- error: (0,_helpers__WEBPACK_IMPORTED_MODULE_11__.errorHandler)(e)
6905
+ error: (0,_helpers__WEBPACK_IMPORTED_MODULE_12__.errorHandler)(e)
6896
6906
  });
6897
6907
  callback == null ? void 0 : callback(null);
6898
6908
  }
@@ -6909,7 +6919,7 @@ const _excluded = ["callback", "error"],
6909
6919
  const data = await api.auth.preEnrollMFASMSForLogin(payload);
6910
6920
  actions.setMfaState({
6911
6921
  otcToken: data.otcToken,
6912
- step: _MfaState_interfaces__WEBPACK_IMPORTED_MODULE_21__.MFAStep.smsVerifyCode,
6922
+ step: _MfaState_interfaces__WEBPACK_IMPORTED_MODULE_22__.MFAStep.smsVerifyCode,
6913
6923
  phoneNumber: data.phoneNumber
6914
6924
  });
6915
6925
  setLoginState({
@@ -6919,7 +6929,7 @@ const _excluded = ["callback", "error"],
6919
6929
  } catch (e) {
6920
6930
  setLoginState({
6921
6931
  loading: false,
6922
- error: (0,_helpers__WEBPACK_IMPORTED_MODULE_11__.errorHandler)(e)
6932
+ error: (0,_helpers__WEBPACK_IMPORTED_MODULE_12__.errorHandler)(e)
6923
6933
  });
6924
6934
  callback == null ? void 0 : callback(null);
6925
6935
  }
@@ -6942,7 +6952,7 @@ const _excluded = ["callback", "error"],
6942
6952
  } catch (e) {
6943
6953
  setLoginState({
6944
6954
  loading: false,
6945
- error: (0,_helpers__WEBPACK_IMPORTED_MODULE_11__.errorHandler)(e)
6955
+ error: (0,_helpers__WEBPACK_IMPORTED_MODULE_12__.errorHandler)(e)
6946
6956
  });
6947
6957
  callback == null ? void 0 : callback(null);
6948
6958
  }
@@ -6954,7 +6964,7 @@ const _excluded = ["callback", "error"],
6954
6964
  activeTenant
6955
6965
  } = payload;
6956
6966
  const mfaState = {
6957
- step: _MfaState_interfaces__WEBPACK_IMPORTED_MODULE_21__.MFAStep.recoveryCode,
6967
+ step: _MfaState_interfaces__WEBPACK_IMPORTED_MODULE_22__.MFAStep.recoveryCode,
6958
6968
  loading: false,
6959
6969
  error: undefined,
6960
6970
  saving: false
@@ -6990,7 +7000,7 @@ const _excluded = ["callback", "error"],
6990
7000
  } catch (e) {
6991
7001
  setLoginState({
6992
7002
  loading: false,
6993
- error: (0,_helpers__WEBPACK_IMPORTED_MODULE_11__.errorHandler)(e)
7003
+ error: (0,_helpers__WEBPACK_IMPORTED_MODULE_12__.errorHandler)(e)
6994
7004
  });
6995
7005
  }
6996
7006
  };
@@ -7085,7 +7095,10 @@ const _excluded = ["callback", "error"],
7085
7095
  }),
7086
7096
  isAuthenticated: true
7087
7097
  });
7088
- await __handleRedirectRefreshToken(shouldNavigateToRegisterQuickLogin);
7098
+ await __handleRedirectRefreshToken({
7099
+ shouldNavigateToRegisterQuickLogin,
7100
+ isSocialLoginRefreshToken: true
7101
+ });
7089
7102
  }
7090
7103
  }
7091
7104
  } catch (e) {
@@ -7136,7 +7149,7 @@ const _excluded = ["callback", "error"],
7136
7149
  refreshTokenForSocialLogins,
7137
7150
  // protected
7138
7151
  __refreshToken
7139
- }, (0,_hostedLoginAuthorize_actions__WEBPACK_IMPORTED_MODULE_22__["default"])(store, api, sharedActions), (0,_afterAuthNavigation_actions__WEBPACK_IMPORTED_MODULE_23__["default"])(store, api, sharedActions), (0,_handleVerifyMFAResponse_actions__WEBPACK_IMPORTED_MODULE_24__["default"])(store, api, sharedActions), (0,_mfaRequiredState_actions__WEBPACK_IMPORTED_MODULE_25__["default"])(store, api, sharedActions), (0,_mfaWithAuthenticator_actions__WEBPACK_IMPORTED_MODULE_26__["default"])(store, api, sharedActions), (0,_mfaWithEmailCode_actions__WEBPACK_IMPORTED_MODULE_27__["default"])(store, api, sharedActions), (0,_mfaWithSMS_actions__WEBPACK_IMPORTED_MODULE_28__["default"])(store, api, sharedActions), (0,_mfaWithWebAuthn_actions__WEBPACK_IMPORTED_MODULE_29__["default"])(store, api, sharedActions));
7152
+ }, (0,_hostedLoginAuthorize_actions__WEBPACK_IMPORTED_MODULE_23__["default"])(store, api, sharedActions), (0,_afterAuthNavigation_actions__WEBPACK_IMPORTED_MODULE_24__["default"])(store, api, sharedActions), (0,_handleVerifyMFAResponse_actions__WEBPACK_IMPORTED_MODULE_25__["default"])(store, api, sharedActions), (0,_mfaRequiredState_actions__WEBPACK_IMPORTED_MODULE_26__["default"])(store, api, sharedActions), (0,_mfaWithAuthenticator_actions__WEBPACK_IMPORTED_MODULE_27__["default"])(store, api, sharedActions), (0,_mfaWithEmailCode_actions__WEBPACK_IMPORTED_MODULE_28__["default"])(store, api, sharedActions), (0,_mfaWithSMS_actions__WEBPACK_IMPORTED_MODULE_29__["default"])(store, api, sharedActions), (0,_mfaWithWebAuthn_actions__WEBPACK_IMPORTED_MODULE_30__["default"])(store, api, sharedActions));
7140
7153
  });
7141
7154
 
7142
7155
  /***/ }),
@@ -19400,7 +19413,7 @@ __webpack_require__.r(__webpack_exports__);
19400
19413
  /* harmony import */ var _subscriptions_interfaces__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./subscriptions/interfaces */ "../../dist/@frontegg/redux-store/subscriptions/interfaces.js");
19401
19414
  /* harmony import */ var _vendor__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./vendor */ "../../dist/@frontegg/redux-store/vendor/index.js");
19402
19415
  /* harmony import */ var _audits__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./audits */ "../../dist/@frontegg/redux-store/audits/index.js");
19403
- /** @license Frontegg v7.88.0
19416
+ /** @license Frontegg v7.89.0
19404
19417
  *
19405
19418
  * This source code is licensed under the MIT license found in the
19406
19419
  * LICENSE file in the root directory of this source tree.
@@ -29679,7 +29692,7 @@ __webpack_require__.r(__webpack_exports__);
29679
29692
  /* harmony import */ var _security_center_interfaces__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./security-center/interfaces */ "../../dist/@frontegg/rest-api/security-center/interfaces.js");
29680
29693
  /* harmony import */ var _applications_interfaces__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./applications/interfaces */ "../../dist/@frontegg/rest-api/applications/interfaces.js");
29681
29694
  /* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./constants */ "../../dist/@frontegg/rest-api/constants.js");
29682
- /** @license Frontegg v7.88.0
29695
+ /** @license Frontegg v7.89.0
29683
29696
  *
29684
29697
  * This source code is licensed under the MIT license found in the
29685
29698
  * LICENSE file in the root directory of this source tree.
@@ -32427,7 +32440,7 @@ __webpack_require__.r(__webpack_exports__);
32427
32440
  /* harmony export */ });
32428
32441
  /* harmony import */ var _ThemeOptions__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ThemeOptions */ "../../dist/@frontegg/types/ThemeOptions/index.js");
32429
32442
  /* harmony import */ var _Metadata__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Metadata */ "../../dist/@frontegg/types/Metadata/index.js");
32430
- /** @license Frontegg v7.88.0
32443
+ /** @license Frontegg v7.89.0
32431
32444
  *
32432
32445
  * This source code is licensed under the MIT license found in the
32433
32446
  * LICENSE file in the root directory of this source tree.