@frontegg/js 7.11.0-alpha.0 → 7.12.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.
- package/index.js +1 -1
- package/node/index.js +1 -1
- package/node/version.js +1 -1
- package/package.json +2 -2
- package/umd/frontegg.development.js +214 -753
- package/umd/frontegg.production.min.js +1 -1
- package/version.js +1 -1
|
@@ -1586,7 +1586,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1586
1586
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
1587
1587
|
/* harmony export */ });
|
|
1588
1588
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
|
|
1589
|
-
cdnVersion: '7.
|
|
1589
|
+
cdnVersion: '7.12.0'
|
|
1590
1590
|
});
|
|
1591
1591
|
|
|
1592
1592
|
/***/ }),
|
|
@@ -2493,10 +2493,7 @@ const _excluded = ["callback", "events"],
|
|
|
2493
2493
|
} = _await$api$auth$activ,
|
|
2494
2494
|
rest = (0,_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_1__["default"])(_await$api$auth$activ, _excluded2);
|
|
2495
2495
|
if (user.redirectLocation) {
|
|
2496
|
-
|
|
2497
|
-
replace: true,
|
|
2498
|
-
refresh: true
|
|
2499
|
-
});
|
|
2496
|
+
window.location.href = user.redirectLocation;
|
|
2500
2497
|
return;
|
|
2501
2498
|
}
|
|
2502
2499
|
if ((0,_helpers__WEBPACK_IMPORTED_MODULE_7__.isMfaRequired)(user, store.root.appName)) {
|
|
@@ -4603,14 +4600,11 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
4603
4600
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
4604
4601
|
/* harmony export */ });
|
|
4605
4602
|
/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "../../node_modules/@babel/runtime/helpers/esm/extends.js");
|
|
4606
|
-
/* harmony import */ var
|
|
4607
|
-
/* harmony import */ var
|
|
4608
|
-
/* harmony import */ var
|
|
4609
|
-
/* harmony import */ var
|
|
4610
|
-
/* harmony import */ var
|
|
4611
|
-
/* harmony import */ var _toolkit__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../toolkit */ "../../dist/@frontegg/redux-store/toolkit/LocalStorage.js");
|
|
4612
|
-
/* harmony import */ var _StepUpState_helpers__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../StepUpState/helpers */ "../../dist/@frontegg/redux-store/auth/StepUpState/helpers.js");
|
|
4613
|
-
|
|
4603
|
+
/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../helpers */ "../../dist/@frontegg/redux-store/auth/LoginState/helpers.js");
|
|
4604
|
+
/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../constants */ "../../dist/@frontegg/redux-store/constants.js");
|
|
4605
|
+
/* harmony import */ var _StepUpState_consts__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../StepUpState/consts */ "../../dist/@frontegg/redux-store/auth/StepUpState/consts.js");
|
|
4606
|
+
/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../helpers */ "../../dist/@frontegg/redux-store/helpers/common.js");
|
|
4607
|
+
/* harmony import */ var _StepUpState_helpers__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../StepUpState/helpers */ "../../dist/@frontegg/redux-store/auth/StepUpState/helpers.js");
|
|
4614
4608
|
|
|
4615
4609
|
|
|
4616
4610
|
|
|
@@ -4628,10 +4622,11 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
4628
4622
|
* In case the url is equal to the window.location.origin, it will return an empty string
|
|
4629
4623
|
*/
|
|
4630
4624
|
function cleanUrlIfSameOrigin(url) {
|
|
4631
|
-
|
|
4625
|
+
var _window, _window2;
|
|
4626
|
+
if (!url.startsWith((_window = window) == null ? void 0 : _window.location.origin)) {
|
|
4632
4627
|
return url;
|
|
4633
4628
|
}
|
|
4634
|
-
return url.replace(
|
|
4629
|
+
return url.replace((_window2 = window) == null ? void 0 : _window2.location.origin, '');
|
|
4635
4630
|
}
|
|
4636
4631
|
|
|
4637
4632
|
/**
|
|
@@ -4673,7 +4668,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
4673
4668
|
allowedRedirectOrigins = []
|
|
4674
4669
|
} = store.auth;
|
|
4675
4670
|
if (customLoginAuthenticatedUrl) {
|
|
4676
|
-
return (0,
|
|
4671
|
+
return (0,_helpers__WEBPACK_IMPORTED_MODULE_1__.getPathAndSearchParamsFromUrl)(customLoginAuthenticatedUrl);
|
|
4677
4672
|
}
|
|
4678
4673
|
const {
|
|
4679
4674
|
authenticatedUrl,
|
|
@@ -4682,11 +4677,11 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
4682
4677
|
socialLoginCallbackUrl,
|
|
4683
4678
|
activateUrl
|
|
4684
4679
|
} = routes;
|
|
4685
|
-
let finalUrl =
|
|
4680
|
+
let finalUrl = window.localStorage.getItem(_constants__WEBPACK_IMPORTED_MODULE_2__.FRONTEGG_AFTER_AUTH_REDIRECT_URL);
|
|
4686
4681
|
if (!finalUrl || [loginUrl, logoutUrl, socialLoginCallbackUrl, activateUrl].includes(finalUrl)) {
|
|
4687
4682
|
finalUrl = authenticatedUrl;
|
|
4688
4683
|
}
|
|
4689
|
-
const redirectUrl =
|
|
4684
|
+
const redirectUrl = (0,_helpers__WEBPACK_IMPORTED_MODULE_1__.getRedirectUrl)({
|
|
4690
4685
|
authenticatedUrl: finalUrl,
|
|
4691
4686
|
includeQueryParam,
|
|
4692
4687
|
enforceRedirectToSameSite,
|
|
@@ -4720,11 +4715,12 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
4720
4715
|
// we don't want to remove the FRONTEGG_AFTER_AUTH_REDIRECT_URL when we are in the step up flow
|
|
4721
4716
|
redirectUrl = forceStepUpUrl;
|
|
4722
4717
|
} else {
|
|
4718
|
+
var _window3;
|
|
4723
4719
|
if (shouldStepUpDuringLogin) {
|
|
4724
4720
|
// getUrlForAfterAuthNavigation give priority to the redirectUrl
|
|
4725
4721
|
// avoiding use of getUrlForAfterAuthNavigation because we don't want to use the redirectUrl for magic link for example
|
|
4726
|
-
const localStorageRedirectUrl =
|
|
4727
|
-
if (localStorageRedirectUrl && !(0,
|
|
4722
|
+
const localStorageRedirectUrl = window.localStorage.getItem(_constants__WEBPACK_IMPORTED_MODULE_2__.FRONTEGG_AFTER_AUTH_REDIRECT_URL);
|
|
4723
|
+
if (localStorageRedirectUrl && !(0,_helpers__WEBPACK_IMPORTED_MODULE_1__.isAbsoluteUrl)(localStorageRedirectUrl)) {
|
|
4728
4724
|
redirectUrl = localStorageRedirectUrl;
|
|
4729
4725
|
}
|
|
4730
4726
|
}
|
|
@@ -4734,9 +4730,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
4734
4730
|
preventRedirectUrlOriginCleaning
|
|
4735
4731
|
});
|
|
4736
4732
|
}
|
|
4737
|
-
|
|
4733
|
+
(_window3 = window) == null ? void 0 : _window3.localStorage.removeItem(_constants__WEBPACK_IMPORTED_MODULE_2__.FRONTEGG_AFTER_AUTH_REDIRECT_URL);
|
|
4738
4734
|
}
|
|
4739
|
-
await (0,
|
|
4735
|
+
await (0,_helpers__WEBPACK_IMPORTED_MODULE_3__.delay)(200);
|
|
4740
4736
|
await resetStateAction();
|
|
4741
4737
|
onRedirectTo(redirectUrl, {
|
|
4742
4738
|
refresh: redirectUrl.startsWith('http')
|
|
@@ -4748,19 +4744,20 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
4748
4744
|
* Handling also step up scenario when user silently logout to continue to step up
|
|
4749
4745
|
*/
|
|
4750
4746
|
const afterAuthNavigation = async payload => {
|
|
4751
|
-
var _payload$preventRedir;
|
|
4747
|
+
var _window4, _payload$preventRedir;
|
|
4752
4748
|
const {
|
|
4753
4749
|
customLoginAuthenticatedUrl,
|
|
4754
4750
|
stepUpUrl
|
|
4755
4751
|
} = store.auth.routes;
|
|
4756
4752
|
|
|
4757
4753
|
// login with magic code, try to step up, no other mfa, invalid max age, force_enroll -> logout, login with first factor, not-stepped up jwt -> navigate to step up
|
|
4758
|
-
const shouldStepUp =
|
|
4754
|
+
const shouldStepUp = (_window4 = window) == null ? void 0 : _window4.localStorage.getItem(_StepUpState_consts__WEBPACK_IMPORTED_MODULE_4__.SHOULD_STEP_UP_KEY);
|
|
4759
4755
|
const user = store.auth.user;
|
|
4760
4756
|
if (shouldStepUp) {
|
|
4761
|
-
|
|
4757
|
+
var _window5;
|
|
4758
|
+
(_window5 = window) == null ? void 0 : _window5.localStorage.removeItem(_StepUpState_consts__WEBPACK_IMPORTED_MODULE_4__.SHOULD_STEP_UP_KEY);
|
|
4762
4759
|
}
|
|
4763
|
-
if (stepUpUrl && shouldStepUp && !(0,
|
|
4760
|
+
if (stepUpUrl && shouldStepUp && !(0,_StepUpState_helpers__WEBPACK_IMPORTED_MODULE_5__.isSteppedUp)(user)) {
|
|
4764
4761
|
return afterAuthNavigationUtil(actions.resetLoginState, {
|
|
4765
4762
|
forceStepUpUrl: stepUpUrl
|
|
4766
4763
|
});
|
|
@@ -4808,8 +4805,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
4808
4805
|
/* harmony import */ var _frontegg_rest_api__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @frontegg/rest-api */ "../../node_modules/@frontegg/rest-api/feature-flags/index.js");
|
|
4809
4806
|
/* harmony import */ var _MfaState_interfaces__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../MfaState/interfaces */ "../../dist/@frontegg/redux-store/auth/MfaState/interfaces.js");
|
|
4810
4807
|
/* harmony import */ var _interfaces__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../interfaces */ "../../dist/@frontegg/redux-store/auth/LoginState/interfaces.js");
|
|
4811
|
-
/* harmony import */ var _toolkit__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../toolkit */ "../../dist/@frontegg/redux-store/toolkit/LocalStorage.js");
|
|
4812
|
-
|
|
4813
4808
|
|
|
4814
4809
|
|
|
4815
4810
|
|
|
@@ -4884,7 +4879,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
4884
4879
|
loading: false
|
|
4885
4880
|
});
|
|
4886
4881
|
if (user.id) {
|
|
4887
|
-
|
|
4882
|
+
localStorage.setItem('userId', user.id);
|
|
4888
4883
|
}
|
|
4889
4884
|
const isAuthenticated = !!user.accessToken;
|
|
4890
4885
|
actions.setAuthState({
|
|
@@ -4918,14 +4913,11 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
4918
4913
|
/* harmony export */ });
|
|
4919
4914
|
/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "../../node_modules/@babel/runtime/helpers/esm/extends.js");
|
|
4920
4915
|
/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../helpers */ "../../dist/@frontegg/redux-store/helpers/random.js");
|
|
4921
|
-
/* harmony import */ var
|
|
4922
|
-
/* harmony import */ var
|
|
4916
|
+
/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../constants */ "../../dist/@frontegg/redux-store/constants.js");
|
|
4917
|
+
/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../helpers */ "../../dist/@frontegg/redux-store/auth/LoginState/helpers.js");
|
|
4923
4918
|
/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../helpers */ "../../dist/@frontegg/redux-store/auth/helpers.js");
|
|
4924
|
-
/* harmony import */ var
|
|
4925
|
-
/* harmony import */ var
|
|
4926
|
-
/* harmony import */ var _toolkit__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../toolkit */ "../../dist/@frontegg/redux-store/toolkit/LocalStorage.js");
|
|
4927
|
-
/* harmony import */ var _toolkit__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../toolkit */ "../../dist/@frontegg/redux-store/toolkit/WindowLocation.js");
|
|
4928
|
-
|
|
4919
|
+
/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../helpers */ "../../dist/@frontegg/redux-store/auth/StepUpState/helpers.js");
|
|
4920
|
+
/* harmony import */ var _StepUpState_consts__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../StepUpState/consts */ "../../dist/@frontegg/redux-store/auth/StepUpState/consts.js");
|
|
4929
4921
|
|
|
4930
4922
|
|
|
4931
4923
|
|
|
@@ -4973,9 +4965,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
4973
4965
|
const code_challenge = await (0,_helpers__WEBPACK_IMPORTED_MODULE_2__.generateCodeChallenge)(code_verifier);
|
|
4974
4966
|
|
|
4975
4967
|
// We are saving the verifier in session storage to be able to validate the response
|
|
4976
|
-
|
|
4977
|
-
const basename = (0,
|
|
4978
|
-
let redirectUrl = `${
|
|
4968
|
+
localStorage.setItem(_constants__WEBPACK_IMPORTED_MODULE_3__.HOSTED_LOGIN_VERIFIER_KEY, code_verifier);
|
|
4969
|
+
const basename = (0,_helpers__WEBPACK_IMPORTED_MODULE_4__.getBaseNameWithoutSlashSuffix)(store);
|
|
4970
|
+
let redirectUrl = `${window.location.origin}${urlStrategy === 'path' ? '' : '#'}${basename != null ? basename : ''}${routes.hostedLoginRedirectUrl}`;
|
|
4979
4971
|
await actions.loadCustomLoginRoutes();
|
|
4980
4972
|
const customLoginSearchParam = (_store$auth$customLog = store.auth.customLoginState) == null ? void 0 : _store$auth$customLog.customLoginSearchParams;
|
|
4981
4973
|
if (customLoginSearchParam) {
|
|
@@ -5003,7 +4995,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
5003
4995
|
params['organization'] = resolvedTenantResult.tenant;
|
|
5004
4996
|
}
|
|
5005
4997
|
}
|
|
5006
|
-
const tenantId = (0,
|
|
4998
|
+
const tenantId = (0,_helpers__WEBPACK_IMPORTED_MODULE_4__.getSearchParam)(_helpers__WEBPACK_IMPORTED_MODULE_4__.TENANT_ID_PARAM_KEY);
|
|
5007
4999
|
if (tenantId) {
|
|
5008
5000
|
params['tenantId'] = tenantId;
|
|
5009
5001
|
}
|
|
@@ -5014,8 +5006,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
5014
5006
|
});
|
|
5015
5007
|
};
|
|
5016
5008
|
const refreshOrRequestHostedLoginAuthorize = async additionalParams => {
|
|
5009
|
+
var _localStorage;
|
|
5017
5010
|
// when the user pause the step up flow we may still have the key in the local storage in hosted - Remove it
|
|
5018
|
-
|
|
5011
|
+
(_localStorage = localStorage) == null ? void 0 : _localStorage.removeItem(_StepUpState_consts__WEBPACK_IMPORTED_MODULE_5__.SHOULD_STEP_UP_KEY);
|
|
5019
5012
|
const disableSilentRefresh = store.auth.disableSilentRefresh;
|
|
5020
5013
|
if ((additionalParams == null ? void 0 : additionalParams['prompt']) === 'login') {
|
|
5021
5014
|
return await requestHostedLoginAuthorize(additionalParams);
|
|
@@ -5030,7 +5023,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
5030
5023
|
}
|
|
5031
5024
|
};
|
|
5032
5025
|
const refreshOrRequestHostedLoginAuthorizeV2 = async payload => {
|
|
5033
|
-
var _additionalParams;
|
|
5026
|
+
var _localStorage2, _additionalParams;
|
|
5034
5027
|
const {
|
|
5035
5028
|
shouldRedirectToLogin,
|
|
5036
5029
|
firstTime,
|
|
@@ -5040,14 +5033,14 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
5040
5033
|
additionalParams
|
|
5041
5034
|
} = payload != null ? payload : {};
|
|
5042
5035
|
// when the user pause the step up flow we may still have the key in the local storage in hosted - Remove it
|
|
5043
|
-
|
|
5036
|
+
(_localStorage2 = localStorage) == null ? void 0 : _localStorage2.removeItem(_StepUpState_consts__WEBPACK_IMPORTED_MODULE_5__.SHOULD_STEP_UP_KEY);
|
|
5044
5037
|
if (firstTime) {
|
|
5045
5038
|
const urlStrategy = store.root.urlStrategy;
|
|
5046
5039
|
const activeUri = (0,_helpers__WEBPACK_IMPORTED_MODULE_1__.getUri)(urlStrategy);
|
|
5047
5040
|
actions.setAuthState({
|
|
5048
5041
|
isLoading: true
|
|
5049
5042
|
});
|
|
5050
|
-
if ((0,
|
|
5043
|
+
if ((0,_helpers__WEBPACK_IMPORTED_MODULE_4__.isOauthCallbackRoute)(activeUri)) {
|
|
5051
5044
|
return;
|
|
5052
5045
|
}
|
|
5053
5046
|
}
|
|
@@ -5077,11 +5070,11 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
5077
5070
|
const handleHostedLoginCallback = async payload => {
|
|
5078
5071
|
var _store$auth$customLog2;
|
|
5079
5072
|
// Hard coded for now
|
|
5080
|
-
const code_verifier =
|
|
5073
|
+
const code_verifier = localStorage.getItem(_constants__WEBPACK_IMPORTED_MODULE_3__.HOSTED_LOGIN_VERIFIER_KEY) || 'INVALID-CODE-VERIFIER';
|
|
5081
5074
|
const routes = store.auth.routes;
|
|
5082
5075
|
const urlStrategy = store.root.urlStrategy;
|
|
5083
|
-
const basename = (0,
|
|
5084
|
-
let redirectUrl = `${
|
|
5076
|
+
const basename = (0,_helpers__WEBPACK_IMPORTED_MODULE_4__.getBaseNameWithoutSlashSuffix)(store);
|
|
5077
|
+
let redirectUrl = `${window.location.origin}${urlStrategy === 'path' ? '' : '#'}${basename != null ? basename : ''}${routes.hostedLoginRedirectUrl}`;
|
|
5085
5078
|
await actions.loadCustomLoginRoutes();
|
|
5086
5079
|
const customLoginSearchParam = (_store$auth$customLog2 = store.auth.customLoginState) == null ? void 0 : _store$auth$customLog2.customLoginSearchParams;
|
|
5087
5080
|
if (customLoginSearchParam) {
|
|
@@ -5109,11 +5102,11 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
5109
5102
|
console.error('Failed to exchangeOAuthTokens', e);
|
|
5110
5103
|
} finally {
|
|
5111
5104
|
const user = store.auth.user;
|
|
5112
|
-
const isStepUpFlow =
|
|
5113
|
-
|
|
5105
|
+
const isStepUpFlow = window.localStorage.getItem(_StepUpState_consts__WEBPACK_IMPORTED_MODULE_5__.SHOULD_STEP_UP_KEY);
|
|
5106
|
+
window.localStorage.removeItem(_StepUpState_consts__WEBPACK_IMPORTED_MODULE_5__.SHOULD_STEP_UP_KEY);
|
|
5114
5107
|
|
|
5115
5108
|
// when the user pause the step up flow we may still have the key in the local storage in hosted. Ignore it.
|
|
5116
|
-
if (isStepUpFlow && (0,
|
|
5109
|
+
if (isStepUpFlow && (0,_helpers__WEBPACK_IMPORTED_MODULE_6__.isSteppedUp)(user)) {
|
|
5117
5110
|
await actions.afterStepUpAuthNavigation();
|
|
5118
5111
|
} else {
|
|
5119
5112
|
await actions.afterAuthNavigation();
|
|
@@ -5144,36 +5137,33 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
5144
5137
|
/* harmony export */ });
|
|
5145
5138
|
/* 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");
|
|
5146
5139
|
/* 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");
|
|
5147
|
-
/* harmony import */ var
|
|
5148
|
-
/* harmony import */ var
|
|
5149
|
-
/* harmony import */ var
|
|
5150
|
-
/* harmony import */ var
|
|
5151
|
-
/* harmony import */ var
|
|
5152
|
-
/* harmony import */ var
|
|
5153
|
-
/* harmony import */ var
|
|
5154
|
-
/* harmony import */ var
|
|
5155
|
-
/* harmony import */ var
|
|
5156
|
-
/* harmony import */ var
|
|
5157
|
-
/* harmony import */ var
|
|
5158
|
-
/* harmony import */ var
|
|
5159
|
-
/* harmony import */ var
|
|
5160
|
-
/* harmony import */ var
|
|
5140
|
+
/* harmony import */ var _afterAuthNavigation_actions__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./afterAuthNavigation.actions */ "../../dist/@frontegg/redux-store/auth/LoginState/actions/afterAuthNavigation.actions.js");
|
|
5141
|
+
/* harmony import */ var _handleVerifyMFAResponse_actions__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./handleVerifyMFAResponse.actions */ "../../dist/@frontegg/redux-store/auth/LoginState/actions/handleVerifyMFAResponse.actions.js");
|
|
5142
|
+
/* harmony import */ var _mfaRequiredState_actions__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./mfaRequiredState.actions */ "../../dist/@frontegg/redux-store/auth/LoginState/actions/mfaRequiredState.actions.js");
|
|
5143
|
+
/* harmony import */ var _mfaWithAuthenticator_actions__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./mfaWithAuthenticator.actions */ "../../dist/@frontegg/redux-store/auth/LoginState/actions/mfaWithAuthenticator.actions.js");
|
|
5144
|
+
/* harmony import */ var _mfaWithEmailCode_actions__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./mfaWithEmailCode.actions */ "../../dist/@frontegg/redux-store/auth/LoginState/actions/mfaWithEmailCode.actions.js");
|
|
5145
|
+
/* harmony import */ var _mfaWithSMS_actions__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./mfaWithSMS.actions */ "../../dist/@frontegg/redux-store/auth/LoginState/actions/mfaWithSMS.actions.js");
|
|
5146
|
+
/* harmony import */ var _mfaWithWebAuthn_actions__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ./mfaWithWebAuthn.actions */ "../../dist/@frontegg/redux-store/auth/LoginState/actions/mfaWithWebAuthn.actions.js");
|
|
5147
|
+
/* harmony import */ var _interfaces__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../interfaces */ "../../dist/@frontegg/redux-store/auth/LoginState/interfaces.js");
|
|
5148
|
+
/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../helpers */ "../../dist/@frontegg/redux-store/helpers/common.js");
|
|
5149
|
+
/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../../helpers */ "../../dist/@frontegg/redux-store/helpers/handlers.js");
|
|
5150
|
+
/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../../helpers */ "../../dist/@frontegg/redux-store/helpers/encoders.js");
|
|
5151
|
+
/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../../helpers */ "../../dist/@frontegg/redux-store/helpers/converters.js");
|
|
5152
|
+
/* harmony import */ var _state__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../state */ "../../dist/@frontegg/redux-store/auth/LoginState/state.js");
|
|
5153
|
+
/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../helpers */ "../../dist/@frontegg/redux-store/auth/LoginState/helpers.js");
|
|
5161
5154
|
/* harmony import */ var _frontegg_rest_api__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @frontegg/rest-api */ "../../node_modules/@frontegg/rest-api/ContextHolder/index.js");
|
|
5162
|
-
/* harmony import */ var
|
|
5163
|
-
/* harmony import */ var
|
|
5164
|
-
/* harmony import */ var
|
|
5165
|
-
/* harmony import */ var
|
|
5166
|
-
/* harmony import */ var
|
|
5167
|
-
/* harmony import */ var
|
|
5168
|
-
/* harmony import */ var
|
|
5169
|
-
/* harmony import */ var
|
|
5170
|
-
/* harmony import */ var
|
|
5171
|
-
/* harmony import */ var
|
|
5172
|
-
/* harmony import */ var
|
|
5173
|
-
/* harmony import */ var
|
|
5174
|
-
/* harmony import */ var _MfaState_interfaces__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../../MfaState/interfaces */ "../../dist/@frontegg/redux-store/auth/MfaState/interfaces.js");
|
|
5175
|
-
/* harmony import */ var _SSOState_interfaces__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../SSOState/interfaces */ "../../dist/@frontegg/redux-store/auth/SSOState/interfaces.js");
|
|
5176
|
-
/* harmony import */ var _frontegg_rest_api__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! @frontegg/rest-api */ "../../node_modules/@frontegg/rest-api/auth/constants.js");
|
|
5155
|
+
/* harmony import */ var _frontegg_rest_api__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @frontegg/rest-api */ "../../node_modules/@frontegg/rest-api/auth/enums.js");
|
|
5156
|
+
/* harmony import */ var _frontegg_rest_api__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! @frontegg/rest-api */ "../../node_modules/@frontegg/rest-api/auth/interfaces.js");
|
|
5157
|
+
/* harmony import */ var _hostedLoginAuthorize_actions__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./hostedLoginAuthorize.actions */ "../../dist/@frontegg/redux-store/auth/LoginState/actions/hostedLoginAuthorize.actions.js");
|
|
5158
|
+
/* harmony import */ var _toolkit__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../toolkit */ "../../dist/@frontegg/redux-store/auth/Entitlements/helpers.js");
|
|
5159
|
+
/* harmony import */ var _toolkit__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../../toolkit */ "../../dist/@frontegg/redux-store/toolkit/FronteggNativeModule.js");
|
|
5160
|
+
/* harmony import */ var _interfaces__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../interfaces */ "../../dist/@frontegg/redux-store/auth/interfaces.js");
|
|
5161
|
+
/* harmony import */ var _consts__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../consts */ "../../dist/@frontegg/redux-store/auth/LoginState/consts.js");
|
|
5162
|
+
/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../../helpers */ "../../dist/@frontegg/redux-store/helpers/gtm.js");
|
|
5163
|
+
/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../helpers */ "../../dist/@frontegg/redux-store/auth/helpers.js");
|
|
5164
|
+
/* harmony import */ var _MfaState_interfaces__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../../MfaState/interfaces */ "../../dist/@frontegg/redux-store/auth/MfaState/interfaces.js");
|
|
5165
|
+
/* harmony import */ var _SSOState_interfaces__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../SSOState/interfaces */ "../../dist/@frontegg/redux-store/auth/SSOState/interfaces.js");
|
|
5166
|
+
/* harmony import */ var _frontegg_rest_api__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! @frontegg/rest-api */ "../../node_modules/@frontegg/rest-api/auth/utils.js");
|
|
5177
5167
|
|
|
5178
5168
|
|
|
5179
5169
|
const _excluded = ["callback"],
|
|
@@ -5248,14 +5238,14 @@ const _excluded = ["callback"],
|
|
|
5248
5238
|
});
|
|
5249
5239
|
}
|
|
5250
5240
|
};
|
|
5251
|
-
const __shouldNevigateToRegisterQuickLogin =
|
|
5241
|
+
const __shouldNevigateToRegisterQuickLogin = user => {
|
|
5252
5242
|
var _ref;
|
|
5253
5243
|
const {
|
|
5254
5244
|
routes,
|
|
5255
5245
|
loginState
|
|
5256
5246
|
} = store.auth;
|
|
5257
|
-
const quickLoginToRegister = (_ref =
|
|
5258
|
-
return quickLoginToRegister &&
|
|
5247
|
+
const quickLoginToRegister = (_ref = localStorage.getItem('register-quick-login')) != null ? _ref : loginState.quickLoginToRegister;
|
|
5248
|
+
return quickLoginToRegister && localStorage.getItem(`${user.id}-${quickLoginToRegister}`) !== 'true' && !window.location.pathname.endsWith(routes.logoutUrl);
|
|
5259
5249
|
};
|
|
5260
5250
|
|
|
5261
5251
|
/** @private */
|
|
@@ -5271,7 +5261,7 @@ const _excluded = ["callback"],
|
|
|
5271
5261
|
tenants = [],
|
|
5272
5262
|
activeTenant
|
|
5273
5263
|
} = await api.auth.refreshTokenV3();
|
|
5274
|
-
if ((0,
|
|
5264
|
+
if ((0,_helpers__WEBPACK_IMPORTED_MODULE_3__.isMfaRequired)(user, store.root.appName)) {
|
|
5275
5265
|
const mfaRequiredState = await actions.getMfaRequiredState(user);
|
|
5276
5266
|
actions.setAuthState(mfaRequiredState);
|
|
5277
5267
|
onRedirectTo(routes.loginUrl, {
|
|
@@ -5280,10 +5270,10 @@ const _excluded = ["callback"],
|
|
|
5280
5270
|
} else {
|
|
5281
5271
|
var _ref2;
|
|
5282
5272
|
if (user.id) {
|
|
5283
|
-
|
|
5273
|
+
localStorage.setItem('userId', user.id);
|
|
5284
5274
|
}
|
|
5285
|
-
const quickLoginToRegister = (_ref2 =
|
|
5286
|
-
const shouldNavigateToRegisterQuickLogin =
|
|
5275
|
+
const quickLoginToRegister = (_ref2 = localStorage.getItem('register-quick-login')) != null ? _ref2 : loginState.quickLoginToRegister;
|
|
5276
|
+
const shouldNavigateToRegisterQuickLogin = __shouldNevigateToRegisterQuickLogin(user);
|
|
5287
5277
|
const updatedUser = await __handleUnnecessaryEntitlementsUpdate(user);
|
|
5288
5278
|
actions.afterAuthenticationStateUpdate({
|
|
5289
5279
|
user: updatedUser,
|
|
@@ -5292,7 +5282,7 @@ const _excluded = ["callback"],
|
|
|
5292
5282
|
}, {
|
|
5293
5283
|
loginState: (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__["default"])({}, loginState, {
|
|
5294
5284
|
quickLoginToRegister,
|
|
5295
|
-
flow: shouldNavigateToRegisterQuickLogin ?
|
|
5285
|
+
flow: shouldNavigateToRegisterQuickLogin ? _interfaces__WEBPACK_IMPORTED_MODULE_4__.LoginFlow.RegisterQuickLogin : _interfaces__WEBPACK_IMPORTED_MODULE_4__.LoginFlow.Login
|
|
5296
5286
|
}),
|
|
5297
5287
|
isAuthenticated: true
|
|
5298
5288
|
});
|
|
@@ -5331,7 +5321,7 @@ const _excluded = ["callback"],
|
|
|
5331
5321
|
var _store$auth$user;
|
|
5332
5322
|
// @ts-ignore TODO: fix entitlements state type
|
|
5333
5323
|
const oldEntitlements = (_store$auth$user = store.auth.user) == null ? void 0 : _store$auth$user.entitlements;
|
|
5334
|
-
if ((0,
|
|
5324
|
+
if ((0,_toolkit__WEBPACK_IMPORTED_MODULE_5__.isEntitlementsDeeplyEqual)(oldEntitlements, updatedUser == null ? void 0 : updatedUser.entitlements)) {
|
|
5335
5325
|
// set the previous entitlemenets object
|
|
5336
5326
|
return (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__["default"])({}, updatedUser, {
|
|
5337
5327
|
entitlements: oldEntitlements
|
|
@@ -5342,7 +5332,8 @@ const _excluded = ["callback"],
|
|
|
5342
5332
|
|
|
5343
5333
|
/** @private */
|
|
5344
5334
|
const __handleRedirectRefreshToken = async shouldNavigateToRegisterQuickLogin => {
|
|
5345
|
-
|
|
5335
|
+
var _window;
|
|
5336
|
+
const url = new URL((_window = window) == null ? void 0 : _window.location.href);
|
|
5346
5337
|
const {
|
|
5347
5338
|
routes,
|
|
5348
5339
|
loginState,
|
|
@@ -5355,8 +5346,8 @@ const _excluded = ["callback"],
|
|
|
5355
5346
|
}
|
|
5356
5347
|
if (shouldNavigateToRegisterQuickLogin) {
|
|
5357
5348
|
onRedirectTo(routes.loginUrl);
|
|
5358
|
-
} else if (redirectRoutes.some(url => url &&
|
|
5359
|
-
if (loginState.isNewUser && routes.signUpSuccessUrl && routes.socialLoginCallbackUrl ===
|
|
5349
|
+
} else if (redirectRoutes.some(url => url && window.location.pathname.endsWith(url))) {
|
|
5350
|
+
if (loginState.isNewUser && routes.signUpSuccessUrl && routes.socialLoginCallbackUrl === window.location.pathname) {
|
|
5360
5351
|
onRedirectTo(routes.signUpSuccessUrl, {
|
|
5361
5352
|
refresh: routes.signUpSuccessUrl.startsWith('http')
|
|
5362
5353
|
});
|
|
@@ -5411,7 +5402,7 @@ const _excluded = ["callback"],
|
|
|
5411
5402
|
onRedirectTo,
|
|
5412
5403
|
routes
|
|
5413
5404
|
} = store.auth;
|
|
5414
|
-
if ((0,
|
|
5405
|
+
if ((0,_helpers__WEBPACK_IMPORTED_MODULE_3__.isMfaRequired)(user, store.root.appName)) {
|
|
5415
5406
|
const mfaRequiredState = await actions.getMfaRequiredState(user);
|
|
5416
5407
|
actions.setAuthState(mfaRequiredState);
|
|
5417
5408
|
onRedirectTo(routes.loginUrl, {
|
|
@@ -5423,7 +5414,7 @@ const _excluded = ["callback"],
|
|
|
5423
5414
|
Object.assign(store.auth.loginState, state);
|
|
5424
5415
|
};
|
|
5425
5416
|
const resetLoginState = () => {
|
|
5426
|
-
(0,
|
|
5417
|
+
(0,_helpers__WEBPACK_IMPORTED_MODULE_6__.deepResetState)(store, ['auth', 'loginState'], _state__WEBPACK_IMPORTED_MODULE_7__.initialState);
|
|
5427
5418
|
};
|
|
5428
5419
|
const requestAuthorize = async firstTime => {
|
|
5429
5420
|
const calls = [];
|
|
@@ -5473,26 +5464,26 @@ const _excluded = ["callback"],
|
|
|
5473
5464
|
const publicPolicy = store.auth.securityPolicyState.publicPolicy.policy;
|
|
5474
5465
|
if (!(publicPolicy != null && publicPolicy.authStrategy)) {
|
|
5475
5466
|
actions.setLoginState({
|
|
5476
|
-
step:
|
|
5467
|
+
step: _interfaces__WEBPACK_IMPORTED_MODULE_4__.LoginStep.loginWithPassword,
|
|
5477
5468
|
loading: false
|
|
5478
5469
|
});
|
|
5479
5470
|
callback == null ? void 0 : callback();
|
|
5480
5471
|
return;
|
|
5481
5472
|
}
|
|
5482
|
-
if ((publicPolicy == null ? void 0 : publicPolicy.authStrategy) ===
|
|
5473
|
+
if ((publicPolicy == null ? void 0 : publicPolicy.authStrategy) === _frontegg_rest_api__WEBPACK_IMPORTED_MODULE_8__.AuthStrategyEnum.EmailAndPassword) {
|
|
5483
5474
|
actions.setLoginState({
|
|
5484
|
-
step:
|
|
5475
|
+
step: _interfaces__WEBPACK_IMPORTED_MODULE_4__.LoginStep.loginWithPassword,
|
|
5485
5476
|
loading: false
|
|
5486
5477
|
});
|
|
5487
5478
|
callback == null ? void 0 : callback();
|
|
5488
|
-
} else if ([
|
|
5479
|
+
} else if ([_frontegg_rest_api__WEBPACK_IMPORTED_MODULE_8__.AuthStrategyEnum.MagicLink, _frontegg_rest_api__WEBPACK_IMPORTED_MODULE_8__.AuthStrategyEnum.Code, _frontegg_rest_api__WEBPACK_IMPORTED_MODULE_8__.AuthStrategyEnum.SmsCode].includes(publicPolicy == null ? void 0 : publicPolicy.authStrategy)) {
|
|
5489
5480
|
await actions.passwordlessPreLogin((0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__["default"])({}, body, {
|
|
5490
5481
|
type: publicPolicy == null ? void 0 : publicPolicy.authStrategy,
|
|
5491
5482
|
callback
|
|
5492
5483
|
}));
|
|
5493
5484
|
} else {
|
|
5494
5485
|
actions.setLoginState({
|
|
5495
|
-
step:
|
|
5486
|
+
step: _interfaces__WEBPACK_IMPORTED_MODULE_4__.LoginStep.loginWithPassword,
|
|
5496
5487
|
loading: false
|
|
5497
5488
|
});
|
|
5498
5489
|
callback == null ? void 0 : callback();
|
|
@@ -5510,7 +5501,7 @@ const _excluded = ["callback"],
|
|
|
5510
5501
|
});
|
|
5511
5502
|
try {
|
|
5512
5503
|
const onRedirectTo = store.auth.onRedirectTo;
|
|
5513
|
-
const tenantId = (0,
|
|
5504
|
+
const tenantId = (0,_helpers__WEBPACK_IMPORTED_MODULE_9__.getSearchParam)(_helpers__WEBPACK_IMPORTED_MODULE_9__.TENANT_ID_PARAM_KEY);
|
|
5514
5505
|
const preLoginResult = await api.auth.preLoginV2({
|
|
5515
5506
|
email,
|
|
5516
5507
|
tenantId
|
|
@@ -5521,21 +5512,21 @@ const _excluded = ["callback"],
|
|
|
5521
5512
|
} = preLoginResult != null ? preLoginResult : {};
|
|
5522
5513
|
if (address) {
|
|
5523
5514
|
let ssoRedirectUrl = address;
|
|
5524
|
-
if (idpType ===
|
|
5515
|
+
if (idpType === _SSOState_interfaces__WEBPACK_IMPORTED_MODULE_10__.SamlVendors.Oidc && !ssoRedirectUrl.includes('redirect_uri')) {
|
|
5525
5516
|
const {
|
|
5526
5517
|
oidcRedirectUrl
|
|
5527
5518
|
} = store.auth.routes;
|
|
5528
|
-
ssoRedirectUrl += `&redirect_uri=${
|
|
5519
|
+
ssoRedirectUrl += `&redirect_uri=${window.location.origin}${oidcRedirectUrl}`;
|
|
5529
5520
|
}
|
|
5530
|
-
if (
|
|
5531
|
-
|
|
5521
|
+
if (_toolkit__WEBPACK_IMPORTED_MODULE_11__["default"].isLoginWithSSOAvailable()) {
|
|
5522
|
+
_toolkit__WEBPACK_IMPORTED_MODULE_11__["default"].loginWithSSO(email);
|
|
5532
5523
|
setLoginState({
|
|
5533
5524
|
loading: false
|
|
5534
5525
|
});
|
|
5535
5526
|
callback == null ? void 0 : callback();
|
|
5536
5527
|
} else {
|
|
5537
5528
|
setLoginState({
|
|
5538
|
-
step:
|
|
5529
|
+
step: _interfaces__WEBPACK_IMPORTED_MODULE_4__.LoginStep.redirectToSSO,
|
|
5539
5530
|
loading: false,
|
|
5540
5531
|
ssoRedirectUrl
|
|
5541
5532
|
});
|
|
@@ -5582,7 +5573,7 @@ const _excluded = ["callback"],
|
|
|
5582
5573
|
onRedirectTo(routes.authenticatedUrl);
|
|
5583
5574
|
}, 1000);
|
|
5584
5575
|
setLoginState({
|
|
5585
|
-
step:
|
|
5576
|
+
step: _interfaces__WEBPACK_IMPORTED_MODULE_4__.LoginStep.loginWithSSOFailed,
|
|
5586
5577
|
loading: false
|
|
5587
5578
|
});
|
|
5588
5579
|
}
|
|
@@ -5613,7 +5604,7 @@ const _excluded = ["callback"],
|
|
|
5613
5604
|
onRedirectTo,
|
|
5614
5605
|
routes
|
|
5615
5606
|
} = store.auth;
|
|
5616
|
-
if ((0,
|
|
5607
|
+
if ((0,_helpers__WEBPACK_IMPORTED_MODULE_3__.isMfaRequired)(user, store.root.appName)) {
|
|
5617
5608
|
const mfaRequiredState = await actions.getMfaRequiredState(user);
|
|
5618
5609
|
actions.setAuthState(mfaRequiredState);
|
|
5619
5610
|
onRedirectTo(routes.loginUrl, {
|
|
@@ -5623,7 +5614,7 @@ const _excluded = ["callback"],
|
|
|
5623
5614
|
const loginState = store.auth.loginState;
|
|
5624
5615
|
const isAuthenticated = !!user.accessToken;
|
|
5625
5616
|
if (user.id) {
|
|
5626
|
-
|
|
5617
|
+
localStorage.setItem('userId', user.id);
|
|
5627
5618
|
}
|
|
5628
5619
|
actions.afterAuthenticationStateUpdate({
|
|
5629
5620
|
user,
|
|
@@ -5637,7 +5628,7 @@ const _excluded = ["callback"],
|
|
|
5637
5628
|
loading: false,
|
|
5638
5629
|
error: undefined,
|
|
5639
5630
|
mfaToken: user.mfaToken,
|
|
5640
|
-
step: loginState.flow ===
|
|
5631
|
+
step: loginState.flow === _interfaces__WEBPACK_IMPORTED_MODULE_4__.LoginFlow.Login ? _interfaces__WEBPACK_IMPORTED_MODULE_4__.LoginStep.success : loginState.step,
|
|
5641
5632
|
tenants,
|
|
5642
5633
|
tenantsLoading: true,
|
|
5643
5634
|
isBreachedPassword: user.isBreachedPassword
|
|
@@ -5645,10 +5636,10 @@ const _excluded = ["callback"],
|
|
|
5645
5636
|
isAuthenticated
|
|
5646
5637
|
});
|
|
5647
5638
|
const [securityCenterLoginFlows] = await actions.getFeatureFlags(['security-center-show-login-flows']);
|
|
5648
|
-
if (loginState.flow ===
|
|
5639
|
+
if (loginState.flow === _interfaces__WEBPACK_IMPORTED_MODULE_4__.LoginFlow.Login) {
|
|
5649
5640
|
if (securityCenterLoginFlows && user.isBreachedPassword && !isAuthenticated) {
|
|
5650
5641
|
setLoginState({
|
|
5651
|
-
step:
|
|
5642
|
+
step: _interfaces__WEBPACK_IMPORTED_MODULE_4__.LoginStep.breachedPassword,
|
|
5652
5643
|
loading: false
|
|
5653
5644
|
});
|
|
5654
5645
|
} else {
|
|
@@ -5656,7 +5647,7 @@ const _excluded = ["callback"],
|
|
|
5656
5647
|
const shouldShowPrompt = await actions.__shouldShowPromptPasskeys();
|
|
5657
5648
|
if (shouldShowPrompt) {
|
|
5658
5649
|
setLoginState({
|
|
5659
|
-
step:
|
|
5650
|
+
step: _interfaces__WEBPACK_IMPORTED_MODULE_4__.LoginStep.promptPasskeys,
|
|
5660
5651
|
loading: false
|
|
5661
5652
|
});
|
|
5662
5653
|
onRedirectTo(routes.loginUrl, {
|
|
@@ -5671,7 +5662,7 @@ const _excluded = ["callback"],
|
|
|
5671
5662
|
}
|
|
5672
5663
|
|
|
5673
5664
|
// TODO: extract item name to constants
|
|
5674
|
-
|
|
5665
|
+
localStorage.removeItem('register-quick-login');
|
|
5675
5666
|
callback == null ? void 0 : callback(true);
|
|
5676
5667
|
} catch (e) {
|
|
5677
5668
|
contextHolder.setAccessToken(null);
|
|
@@ -5679,7 +5670,7 @@ const _excluded = ["callback"],
|
|
|
5679
5670
|
callback == null ? void 0 : callback(false, e);
|
|
5680
5671
|
setLoginState({
|
|
5681
5672
|
email,
|
|
5682
|
-
error: (0,
|
|
5673
|
+
error: (0,_helpers__WEBPACK_IMPORTED_MODULE_12__.errorHandler)(e),
|
|
5683
5674
|
loading: false
|
|
5684
5675
|
});
|
|
5685
5676
|
}
|
|
@@ -5699,7 +5690,7 @@ const _excluded = ["callback"],
|
|
|
5699
5690
|
/* empty */
|
|
5700
5691
|
}
|
|
5701
5692
|
if (contextHolder.isSessionPerTenantEnabled()) {
|
|
5702
|
-
|
|
5693
|
+
(0,_frontegg_rest_api__WEBPACK_IMPORTED_MODULE_13__.removeTabTenantFromSessionStorage)();
|
|
5703
5694
|
}
|
|
5704
5695
|
actions.resetAuthState();
|
|
5705
5696
|
await actions.requestAuthorize(true);
|
|
@@ -5713,7 +5704,7 @@ const _excluded = ["callback"],
|
|
|
5713
5704
|
/* empty */
|
|
5714
5705
|
}
|
|
5715
5706
|
if (contextHolder.isSessionPerTenantEnabled()) {
|
|
5716
|
-
|
|
5707
|
+
(0,_frontegg_rest_api__WEBPACK_IMPORTED_MODULE_13__.removeTabTenantFromSessionStorage)();
|
|
5717
5708
|
}
|
|
5718
5709
|
setTimeout(() => {
|
|
5719
5710
|
var _payload$callback;
|
|
@@ -5730,7 +5721,7 @@ const _excluded = ["callback"],
|
|
|
5730
5721
|
setLoginState({
|
|
5731
5722
|
loading: false,
|
|
5732
5723
|
error: undefined,
|
|
5733
|
-
step:
|
|
5724
|
+
step: _interfaces__WEBPACK_IMPORTED_MODULE_4__.LoginStep.preLogin
|
|
5734
5725
|
});
|
|
5735
5726
|
actions.setAuthState({
|
|
5736
5727
|
user: undefined,
|
|
@@ -5740,7 +5731,7 @@ const _excluded = ["callback"],
|
|
|
5740
5731
|
} catch (e) {
|
|
5741
5732
|
var _payload$callback3;
|
|
5742
5733
|
setLoginState({
|
|
5743
|
-
error: (0,
|
|
5734
|
+
error: (0,_helpers__WEBPACK_IMPORTED_MODULE_12__.errorHandler)(e),
|
|
5744
5735
|
loading: false
|
|
5745
5736
|
});
|
|
5746
5737
|
(_payload$callback3 = payload.callback) == null ? void 0 : _payload$callback3.call(payload, false, e);
|
|
@@ -5759,10 +5750,10 @@ const _excluded = ["callback"],
|
|
|
5759
5750
|
// TODO: fix @frontegg/rest-api return value
|
|
5760
5751
|
// @ts-ignore
|
|
5761
5752
|
const preloginRes = await api.auth.passwordlessPreLogin((0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__["default"])({}, payload, {
|
|
5762
|
-
type:
|
|
5753
|
+
type: _frontegg_rest_api__WEBPACK_IMPORTED_MODULE_8__.AuthStrategyEnum.SmsCode
|
|
5763
5754
|
}));
|
|
5764
5755
|
setLoginState({
|
|
5765
|
-
step:
|
|
5756
|
+
step: _interfaces__WEBPACK_IMPORTED_MODULE_4__.LoginStep.loginWithQuickSmsOtc,
|
|
5766
5757
|
loading: false,
|
|
5767
5758
|
phoneNumber: preloginRes == null ? void 0 : preloginRes.phoneNumber,
|
|
5768
5759
|
error: undefined
|
|
@@ -5770,7 +5761,7 @@ const _excluded = ["callback"],
|
|
|
5770
5761
|
callback == null ? void 0 : callback(true);
|
|
5771
5762
|
} catch (e) {
|
|
5772
5763
|
setLoginState({
|
|
5773
|
-
error: (0,
|
|
5764
|
+
error: (0,_helpers__WEBPACK_IMPORTED_MODULE_12__.errorHandler)(e),
|
|
5774
5765
|
loading: false
|
|
5775
5766
|
});
|
|
5776
5767
|
callback == null ? void 0 : callback(false, e);
|
|
@@ -5790,13 +5781,13 @@ const _excluded = ["callback"],
|
|
|
5790
5781
|
phoneNumber: payload.phoneNumber,
|
|
5791
5782
|
loading: false,
|
|
5792
5783
|
changePhoneId: changePhoneRes.changePhoneId,
|
|
5793
|
-
step:
|
|
5784
|
+
step: _interfaces__WEBPACK_IMPORTED_MODULE_4__.LoginStep.loginWithQuickSmsOtc,
|
|
5794
5785
|
error: undefined
|
|
5795
5786
|
});
|
|
5796
5787
|
callback == null ? void 0 : callback(true);
|
|
5797
5788
|
} catch (e) {
|
|
5798
5789
|
setLoginState({
|
|
5799
|
-
error: (0,
|
|
5790
|
+
error: (0,_helpers__WEBPACK_IMPORTED_MODULE_12__.errorHandler)(e),
|
|
5800
5791
|
loading: false
|
|
5801
5792
|
});
|
|
5802
5793
|
}
|
|
@@ -5817,7 +5808,7 @@ const _excluded = ["callback"],
|
|
|
5817
5808
|
callback == null ? void 0 : callback(true);
|
|
5818
5809
|
} catch (e) {
|
|
5819
5810
|
setLoginState({
|
|
5820
|
-
error: (0,
|
|
5811
|
+
error: (0,_helpers__WEBPACK_IMPORTED_MODULE_12__.errorHandler)(e),
|
|
5821
5812
|
loading: false
|
|
5822
5813
|
});
|
|
5823
5814
|
}
|
|
@@ -5832,14 +5823,14 @@ const _excluded = ["callback"],
|
|
|
5832
5823
|
loading: true
|
|
5833
5824
|
});
|
|
5834
5825
|
let email;
|
|
5835
|
-
if ((0,
|
|
5826
|
+
if ((0,_helpers__WEBPACK_IMPORTED_MODULE_9__.isEmailPayload)(payload)) {
|
|
5836
5827
|
email = payload.email;
|
|
5837
5828
|
}
|
|
5838
5829
|
// TODO: [Typescript 4.8] fix @frontegg/rest-api return value
|
|
5839
5830
|
// @ts-ignore
|
|
5840
5831
|
const preloginRes = await api.auth.passwordlessPreLogin(payload);
|
|
5841
5832
|
// @ts-ignore
|
|
5842
|
-
const step =
|
|
5833
|
+
const step = _consts__WEBPACK_IMPORTED_MODULE_14__.authStrategyLoginStepMap[payload.type];
|
|
5843
5834
|
setLoginState({
|
|
5844
5835
|
step,
|
|
5845
5836
|
loading: false,
|
|
@@ -5850,7 +5841,7 @@ const _excluded = ["callback"],
|
|
|
5850
5841
|
callback == null ? void 0 : callback();
|
|
5851
5842
|
} catch (e) {
|
|
5852
5843
|
setLoginState({
|
|
5853
|
-
error: (0,
|
|
5844
|
+
error: (0,_helpers__WEBPACK_IMPORTED_MODULE_12__.errorHandler)(e),
|
|
5854
5845
|
loading: false
|
|
5855
5846
|
});
|
|
5856
5847
|
callback == null ? void 0 : callback(null, e);
|
|
@@ -5875,7 +5866,7 @@ const _excluded = ["callback"],
|
|
|
5875
5866
|
routes,
|
|
5876
5867
|
onRedirectTo
|
|
5877
5868
|
} = store.auth;
|
|
5878
|
-
if ((0,
|
|
5869
|
+
if ((0,_helpers__WEBPACK_IMPORTED_MODULE_3__.isMfaRequired)(user, store.root.appName)) {
|
|
5879
5870
|
const mfaRequiredState = await actions.getMfaRequiredState(user);
|
|
5880
5871
|
actions.setAuthState(mfaRequiredState);
|
|
5881
5872
|
onRedirectTo(routes.loginUrl, {
|
|
@@ -5887,17 +5878,17 @@ const _excluded = ["callback"],
|
|
|
5887
5878
|
var _events$userVerified;
|
|
5888
5879
|
const userVerifiedPayload = {
|
|
5889
5880
|
email: user.email,
|
|
5890
|
-
origin:
|
|
5881
|
+
origin: _interfaces__WEBPACK_IMPORTED_MODULE_15__.UserVeirifedOriginTypes.PASSWORDLESS,
|
|
5891
5882
|
id: user.id,
|
|
5892
5883
|
tenantId: user.tenantId,
|
|
5893
5884
|
createdAt: new Date(),
|
|
5894
5885
|
name: user.name
|
|
5895
5886
|
};
|
|
5896
5887
|
events == null ? void 0 : (_events$userVerified = events.userVerified) == null ? void 0 : _events$userVerified.call(events, userVerifiedPayload);
|
|
5897
|
-
(0,
|
|
5888
|
+
(0,_helpers__WEBPACK_IMPORTED_MODULE_16__.reportGTMEvent)(_helpers__WEBPACK_IMPORTED_MODULE_16__.GTMEventAction.USER_VERIFIED, userVerifiedPayload);
|
|
5898
5889
|
}
|
|
5899
5890
|
if (user.id) {
|
|
5900
|
-
|
|
5891
|
+
localStorage.setItem('userId', user.id);
|
|
5901
5892
|
}
|
|
5902
5893
|
actions.afterAuthenticationStateUpdate({
|
|
5903
5894
|
user,
|
|
@@ -5910,11 +5901,11 @@ const _excluded = ["callback"],
|
|
|
5910
5901
|
actions.setAuthState({
|
|
5911
5902
|
isLoading: false
|
|
5912
5903
|
});
|
|
5913
|
-
if (loginState.flow ===
|
|
5904
|
+
if (loginState.flow === _interfaces__WEBPACK_IMPORTED_MODULE_4__.LoginFlow.Login) {
|
|
5914
5905
|
const shouldShowPrompt = await actions.__shouldShowPromptPasskeys();
|
|
5915
5906
|
if (shouldShowPrompt) {
|
|
5916
5907
|
actions.setLoginState({
|
|
5917
|
-
step:
|
|
5908
|
+
step: _interfaces__WEBPACK_IMPORTED_MODULE_4__.LoginStep.promptPasskeys,
|
|
5918
5909
|
loading: false
|
|
5919
5910
|
});
|
|
5920
5911
|
onRedirectTo(routes.loginUrl, {
|
|
@@ -5931,12 +5922,12 @@ const _excluded = ["callback"],
|
|
|
5931
5922
|
preserveQueryParams: true
|
|
5932
5923
|
});
|
|
5933
5924
|
}
|
|
5934
|
-
|
|
5925
|
+
localStorage.removeItem('register-quick-login');
|
|
5935
5926
|
callback == null ? void 0 : callback(true);
|
|
5936
5927
|
}
|
|
5937
5928
|
} catch (e) {
|
|
5938
5929
|
setLoginState({
|
|
5939
|
-
error: (0,
|
|
5930
|
+
error: (0,_helpers__WEBPACK_IMPORTED_MODULE_12__.errorHandler)(e, 'Failed to authenticate')
|
|
5940
5931
|
});
|
|
5941
5932
|
callback == null ? void 0 : callback(null, e);
|
|
5942
5933
|
} finally {
|
|
@@ -5960,7 +5951,7 @@ const _excluded = ["callback"],
|
|
|
5960
5951
|
});
|
|
5961
5952
|
} catch (e) {
|
|
5962
5953
|
setLoginState({
|
|
5963
|
-
inviteTokenError: (0,
|
|
5954
|
+
inviteTokenError: (0,_helpers__WEBPACK_IMPORTED_MODULE_12__.errorHandler)(e, `We couldn't verify your invitation`)
|
|
5964
5955
|
});
|
|
5965
5956
|
} finally {
|
|
5966
5957
|
setLoginState({
|
|
@@ -5986,9 +5977,9 @@ const _excluded = ["callback"],
|
|
|
5986
5977
|
const {
|
|
5987
5978
|
options
|
|
5988
5979
|
} = await api.auth.webAuthnPreLogin(body);
|
|
5989
|
-
options.challenge = (0,
|
|
5980
|
+
options.challenge = (0,_helpers__WEBPACK_IMPORTED_MODULE_17__.base64urlDecode)(options.challenge);
|
|
5990
5981
|
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, {
|
|
5991
|
-
id: (0,
|
|
5982
|
+
id: (0,_helpers__WEBPACK_IMPORTED_MODULE_17__.base64urlDecode)(credentials.id)
|
|
5992
5983
|
}));
|
|
5993
5984
|
setLoginState({
|
|
5994
5985
|
error: undefined
|
|
@@ -5996,7 +5987,7 @@ const _excluded = ["callback"],
|
|
|
5996
5987
|
callback == null ? void 0 : callback(options);
|
|
5997
5988
|
} catch (e) {
|
|
5998
5989
|
setLoginState({
|
|
5999
|
-
error: (0,
|
|
5990
|
+
error: (0,_helpers__WEBPACK_IMPORTED_MODULE_12__.errorHandler)(e)
|
|
6000
5991
|
});
|
|
6001
5992
|
callback == null ? void 0 : callback(null);
|
|
6002
5993
|
} finally {
|
|
@@ -6021,7 +6012,7 @@ const _excluded = ["callback"],
|
|
|
6021
6012
|
setLoginState({
|
|
6022
6013
|
loading: true
|
|
6023
6014
|
});
|
|
6024
|
-
const publicKey = (0,
|
|
6015
|
+
const publicKey = (0,_helpers__WEBPACK_IMPORTED_MODULE_18__.publicKeyCredentialToJSON)(body.publicKey);
|
|
6025
6016
|
const _await$api$auth$webAu = await api.auth.webAuthnPostLoginV2((0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__["default"])({}, publicKey, {
|
|
6026
6017
|
response: (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__["default"])({}, publicKey.response, {
|
|
6027
6018
|
userHandle: (_publicKey$response$u = publicKey.response.userHandle) != null ? _publicKey$response$u : undefined
|
|
@@ -6033,7 +6024,7 @@ const _excluded = ["callback"],
|
|
|
6033
6024
|
user
|
|
6034
6025
|
} = _await$api$auth$webAu,
|
|
6035
6026
|
rest = (0,_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__["default"])(_await$api$auth$webAu, _excluded9);
|
|
6036
|
-
if ((0,
|
|
6027
|
+
if ((0,_helpers__WEBPACK_IMPORTED_MODULE_3__.isMfaRequired)(user, store.root.appName)) {
|
|
6037
6028
|
const {
|
|
6038
6029
|
routes,
|
|
6039
6030
|
onRedirectTo
|
|
@@ -6045,7 +6036,7 @@ const _excluded = ["callback"],
|
|
|
6045
6036
|
});
|
|
6046
6037
|
} else {
|
|
6047
6038
|
if (user.id) {
|
|
6048
|
-
|
|
6039
|
+
localStorage.setItem('userId', user.id);
|
|
6049
6040
|
}
|
|
6050
6041
|
actions.afterAuthenticationStateUpdate((0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__["default"])({
|
|
6051
6042
|
user
|
|
@@ -6062,7 +6053,7 @@ const _excluded = ["callback"],
|
|
|
6062
6053
|
// callback?.(true);
|
|
6063
6054
|
} catch (e) {
|
|
6064
6055
|
setLoginState({
|
|
6065
|
-
error: (0,
|
|
6056
|
+
error: (0,_helpers__WEBPACK_IMPORTED_MODULE_12__.errorHandler)(e)
|
|
6066
6057
|
});
|
|
6067
6058
|
callback == null ? void 0 : callback(null);
|
|
6068
6059
|
} finally {
|
|
@@ -6087,13 +6078,13 @@ const _excluded = ["callback"],
|
|
|
6087
6078
|
const {
|
|
6088
6079
|
options
|
|
6089
6080
|
} = await api.auth.webAuthnCreateNewDeviceSession();
|
|
6090
|
-
options.user.id = (0,
|
|
6091
|
-
options.challenge = (0,
|
|
6081
|
+
options.user.id = (0,_helpers__WEBPACK_IMPORTED_MODULE_17__.base64urlDecode)(options.user.id);
|
|
6082
|
+
options.challenge = (0,_helpers__WEBPACK_IMPORTED_MODULE_17__.base64urlDecode)(options.challenge);
|
|
6092
6083
|
options.excludeCredentials = [];
|
|
6093
6084
|
callback == null ? void 0 : callback(options);
|
|
6094
6085
|
} catch (e) {
|
|
6095
6086
|
setLoginState({
|
|
6096
|
-
error: (0,
|
|
6087
|
+
error: (0,_helpers__WEBPACK_IMPORTED_MODULE_12__.errorHandler)(e)
|
|
6097
6088
|
});
|
|
6098
6089
|
callback == null ? void 0 : callback(null);
|
|
6099
6090
|
} finally {
|
|
@@ -6111,8 +6102,8 @@ const _excluded = ["callback"],
|
|
|
6111
6102
|
setLoginState({
|
|
6112
6103
|
loading: true
|
|
6113
6104
|
});
|
|
6114
|
-
const publicKey = (0,
|
|
6115
|
-
const deviceType = (publicKey == null ? void 0 : publicKey.authenticatorAttachment) === 'platform' ?
|
|
6105
|
+
const publicKey = (0,_helpers__WEBPACK_IMPORTED_MODULE_18__.publicKeyCredentialToJSON)(body.publicKey);
|
|
6106
|
+
const deviceType = (publicKey == null ? void 0 : publicKey.authenticatorAttachment) === 'platform' ? _frontegg_rest_api__WEBPACK_IMPORTED_MODULE_19__.WebAuthnDeviceType.Platform : _frontegg_rest_api__WEBPACK_IMPORTED_MODULE_19__.WebAuthnDeviceType.CrossPlatform;
|
|
6116
6107
|
await api.auth.verifyNewDeviceSession({
|
|
6117
6108
|
id: publicKey.id,
|
|
6118
6109
|
response: publicKey.response,
|
|
@@ -6121,7 +6112,7 @@ const _excluded = ["callback"],
|
|
|
6121
6112
|
callback == null ? void 0 : callback(true);
|
|
6122
6113
|
} catch (e) {
|
|
6123
6114
|
setLoginState({
|
|
6124
|
-
error: (0,
|
|
6115
|
+
error: (0,_helpers__WEBPACK_IMPORTED_MODULE_12__.errorHandler)(e)
|
|
6125
6116
|
});
|
|
6126
6117
|
callback == null ? void 0 : callback(null);
|
|
6127
6118
|
} finally {
|
|
@@ -6158,12 +6149,12 @@ const _excluded = ["callback"],
|
|
|
6158
6149
|
var _data$options$exclude;
|
|
6159
6150
|
const data = await api.auth.preEnrollMFAWebAuthnForLogin(payload);
|
|
6160
6151
|
const options = (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__["default"])({}, data.options, {
|
|
6161
|
-
challenge: (0,
|
|
6152
|
+
challenge: (0,_helpers__WEBPACK_IMPORTED_MODULE_17__.base64urlDecode)(data.options.challenge),
|
|
6162
6153
|
user: (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__["default"])({}, data.options.user, {
|
|
6163
|
-
id: (0,
|
|
6154
|
+
id: (0,_helpers__WEBPACK_IMPORTED_MODULE_17__.base64urlDecode)(data.options.user.id)
|
|
6164
6155
|
}),
|
|
6165
6156
|
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, {
|
|
6166
|
-
id: (0,
|
|
6157
|
+
id: (0,_helpers__WEBPACK_IMPORTED_MODULE_17__.base64urlDecode)(credentials.id)
|
|
6167
6158
|
}))
|
|
6168
6159
|
});
|
|
6169
6160
|
setLoginState({
|
|
@@ -6176,7 +6167,7 @@ const _excluded = ["callback"],
|
|
|
6176
6167
|
} catch (e) {
|
|
6177
6168
|
setLoginState({
|
|
6178
6169
|
loading: false,
|
|
6179
|
-
error: (0,
|
|
6170
|
+
error: (0,_helpers__WEBPACK_IMPORTED_MODULE_12__.errorHandler)(e)
|
|
6180
6171
|
});
|
|
6181
6172
|
callback == null ? void 0 : callback(null);
|
|
6182
6173
|
}
|
|
@@ -6190,7 +6181,7 @@ const _excluded = ["callback"],
|
|
|
6190
6181
|
loading: true
|
|
6191
6182
|
});
|
|
6192
6183
|
try {
|
|
6193
|
-
const publicKey = (0,
|
|
6184
|
+
const publicKey = (0,_helpers__WEBPACK_IMPORTED_MODULE_18__.publicKeyCredentialToJSON)(payload.publicKey);
|
|
6194
6185
|
const data = await api.auth.enrollMFAWebAuthnForLoginV2((0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__["default"])({}, payload, {
|
|
6195
6186
|
options: publicKey
|
|
6196
6187
|
}));
|
|
@@ -6202,7 +6193,7 @@ const _excluded = ["callback"],
|
|
|
6202
6193
|
} catch (e) {
|
|
6203
6194
|
setLoginState({
|
|
6204
6195
|
loading: false,
|
|
6205
|
-
error: (0,
|
|
6196
|
+
error: (0,_helpers__WEBPACK_IMPORTED_MODULE_12__.errorHandler)(e)
|
|
6206
6197
|
});
|
|
6207
6198
|
callback == null ? void 0 : callback(null);
|
|
6208
6199
|
}
|
|
@@ -6225,7 +6216,7 @@ const _excluded = ["callback"],
|
|
|
6225
6216
|
} catch (e) {
|
|
6226
6217
|
setLoginState({
|
|
6227
6218
|
loading: false,
|
|
6228
|
-
error: (0,
|
|
6219
|
+
error: (0,_helpers__WEBPACK_IMPORTED_MODULE_12__.errorHandler)(e)
|
|
6229
6220
|
});
|
|
6230
6221
|
callback == null ? void 0 : callback(null);
|
|
6231
6222
|
}
|
|
@@ -6242,7 +6233,7 @@ const _excluded = ["callback"],
|
|
|
6242
6233
|
const data = await api.auth.preEnrollMFASMSForLogin(payload);
|
|
6243
6234
|
actions.setMfaState({
|
|
6244
6235
|
otcToken: data.otcToken,
|
|
6245
|
-
step:
|
|
6236
|
+
step: _MfaState_interfaces__WEBPACK_IMPORTED_MODULE_20__.MFAStep.smsVerifyCode,
|
|
6246
6237
|
phoneNumber: data.phoneNumber
|
|
6247
6238
|
});
|
|
6248
6239
|
setLoginState({
|
|
@@ -6252,7 +6243,7 @@ const _excluded = ["callback"],
|
|
|
6252
6243
|
} catch (e) {
|
|
6253
6244
|
setLoginState({
|
|
6254
6245
|
loading: false,
|
|
6255
|
-
error: (0,
|
|
6246
|
+
error: (0,_helpers__WEBPACK_IMPORTED_MODULE_12__.errorHandler)(e)
|
|
6256
6247
|
});
|
|
6257
6248
|
callback == null ? void 0 : callback(null);
|
|
6258
6249
|
}
|
|
@@ -6275,7 +6266,7 @@ const _excluded = ["callback"],
|
|
|
6275
6266
|
} catch (e) {
|
|
6276
6267
|
setLoginState({
|
|
6277
6268
|
loading: false,
|
|
6278
|
-
error: (0,
|
|
6269
|
+
error: (0,_helpers__WEBPACK_IMPORTED_MODULE_12__.errorHandler)(e)
|
|
6279
6270
|
});
|
|
6280
6271
|
callback == null ? void 0 : callback(null);
|
|
6281
6272
|
}
|
|
@@ -6287,7 +6278,7 @@ const _excluded = ["callback"],
|
|
|
6287
6278
|
activeTenant
|
|
6288
6279
|
} = payload;
|
|
6289
6280
|
const mfaState = {
|
|
6290
|
-
step:
|
|
6281
|
+
step: _MfaState_interfaces__WEBPACK_IMPORTED_MODULE_20__.MFAStep.recoveryCode,
|
|
6291
6282
|
loading: false,
|
|
6292
6283
|
error: undefined,
|
|
6293
6284
|
saving: false
|
|
@@ -6303,7 +6294,7 @@ const _excluded = ["callback"],
|
|
|
6303
6294
|
loading: false
|
|
6304
6295
|
});
|
|
6305
6296
|
if (user.id) {
|
|
6306
|
-
|
|
6297
|
+
localStorage.setItem('userId', user.id);
|
|
6307
6298
|
}
|
|
6308
6299
|
};
|
|
6309
6300
|
const resetBreachedPassword = async payload => {
|
|
@@ -6315,7 +6306,7 @@ const _excluded = ["callback"],
|
|
|
6315
6306
|
setLoginState({
|
|
6316
6307
|
loading: false,
|
|
6317
6308
|
error: undefined,
|
|
6318
|
-
step:
|
|
6309
|
+
step: _interfaces__WEBPACK_IMPORTED_MODULE_4__.LoginStep.breachedPasswordSuccess
|
|
6319
6310
|
});
|
|
6320
6311
|
actions.setAuthState({
|
|
6321
6312
|
isAuthenticated: false
|
|
@@ -6323,7 +6314,7 @@ const _excluded = ["callback"],
|
|
|
6323
6314
|
} catch (e) {
|
|
6324
6315
|
setLoginState({
|
|
6325
6316
|
loading: false,
|
|
6326
|
-
error: (0,
|
|
6317
|
+
error: (0,_helpers__WEBPACK_IMPORTED_MODULE_12__.errorHandler)(e)
|
|
6327
6318
|
});
|
|
6328
6319
|
}
|
|
6329
6320
|
};
|
|
@@ -6376,7 +6367,7 @@ const _excluded = ["callback"],
|
|
|
6376
6367
|
tenants = [],
|
|
6377
6368
|
activeTenant
|
|
6378
6369
|
} = await api.auth.refreshTokenV3();
|
|
6379
|
-
if ((0,
|
|
6370
|
+
if ((0,_helpers__WEBPACK_IMPORTED_MODULE_3__.isMfaRequired)(user, store.root.appName)) {
|
|
6380
6371
|
const mfaRequiredState = await actions.getMfaRequiredState(user);
|
|
6381
6372
|
actions.setAuthState(mfaRequiredState);
|
|
6382
6373
|
onRedirectTo(routes.loginUrl, {
|
|
@@ -6387,7 +6378,7 @@ const _excluded = ["callback"],
|
|
|
6387
6378
|
const shouldShowPrompt = await actions.__shouldShowPromptPasskeys();
|
|
6388
6379
|
if (shouldShowPrompt) {
|
|
6389
6380
|
actions.setLoginState({
|
|
6390
|
-
step:
|
|
6381
|
+
step: _interfaces__WEBPACK_IMPORTED_MODULE_4__.LoginStep.promptPasskeys,
|
|
6391
6382
|
loading: false
|
|
6392
6383
|
});
|
|
6393
6384
|
actions.afterAuthenticationStateUpdate({
|
|
@@ -6403,10 +6394,10 @@ const _excluded = ["callback"],
|
|
|
6403
6394
|
} else {
|
|
6404
6395
|
var _ref4;
|
|
6405
6396
|
if (user.id) {
|
|
6406
|
-
|
|
6397
|
+
localStorage.setItem('userId', user.id);
|
|
6407
6398
|
}
|
|
6408
|
-
const quickLoginToRegister = (_ref4 =
|
|
6409
|
-
const shouldNavigateToRegisterQuickLogin =
|
|
6399
|
+
const quickLoginToRegister = (_ref4 = localStorage.getItem('register-quick-login')) != null ? _ref4 : loginState.quickLoginToRegister;
|
|
6400
|
+
const shouldNavigateToRegisterQuickLogin = __shouldNevigateToRegisterQuickLogin(user);
|
|
6410
6401
|
actions.afterAuthenticationStateUpdate({
|
|
6411
6402
|
user: updatedUser,
|
|
6412
6403
|
tenants,
|
|
@@ -6414,7 +6405,7 @@ const _excluded = ["callback"],
|
|
|
6414
6405
|
}, {
|
|
6415
6406
|
loginState: (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__["default"])({}, loginState, {
|
|
6416
6407
|
quickLoginToRegister,
|
|
6417
|
-
flow: shouldNavigateToRegisterQuickLogin ?
|
|
6408
|
+
flow: shouldNavigateToRegisterQuickLogin ? _interfaces__WEBPACK_IMPORTED_MODULE_4__.LoginFlow.RegisterQuickLogin : _interfaces__WEBPACK_IMPORTED_MODULE_4__.LoginFlow.Login
|
|
6418
6409
|
}),
|
|
6419
6410
|
isAuthenticated: true
|
|
6420
6411
|
});
|
|
@@ -6469,7 +6460,7 @@ const _excluded = ["callback"],
|
|
|
6469
6460
|
refreshTokenForSocialLogins,
|
|
6470
6461
|
// protected
|
|
6471
6462
|
__refreshToken
|
|
6472
|
-
}, (0,
|
|
6463
|
+
}, (0,_hostedLoginAuthorize_actions__WEBPACK_IMPORTED_MODULE_21__["default"])(store, api, sharedActions), (0,_afterAuthNavigation_actions__WEBPACK_IMPORTED_MODULE_22__["default"])(store, api, sharedActions), (0,_handleVerifyMFAResponse_actions__WEBPACK_IMPORTED_MODULE_23__["default"])(store, api, sharedActions), (0,_mfaRequiredState_actions__WEBPACK_IMPORTED_MODULE_24__["default"])(store, api, sharedActions), (0,_mfaWithAuthenticator_actions__WEBPACK_IMPORTED_MODULE_25__["default"])(store, api, sharedActions), (0,_mfaWithEmailCode_actions__WEBPACK_IMPORTED_MODULE_26__["default"])(store, api, sharedActions), (0,_mfaWithSMS_actions__WEBPACK_IMPORTED_MODULE_27__["default"])(store, api, sharedActions), (0,_mfaWithWebAuthn_actions__WEBPACK_IMPORTED_MODULE_28__["default"])(store, api, sharedActions));
|
|
6473
6464
|
});
|
|
6474
6465
|
|
|
6475
6466
|
/***/ }),
|
|
@@ -6489,8 +6480,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
6489
6480
|
/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../helpers */ "../../dist/@frontegg/redux-store/auth/LoginState/helpers.js");
|
|
6490
6481
|
/* harmony import */ var _interfaces__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../interfaces */ "../../dist/@frontegg/redux-store/auth/LoginState/interfaces.js");
|
|
6491
6482
|
/* harmony import */ var _MfaState_interfaces__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../MfaState/interfaces */ "../../dist/@frontegg/redux-store/auth/MfaState/interfaces.js");
|
|
6492
|
-
/* harmony import */ var _toolkit__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../toolkit */ "../../dist/@frontegg/redux-store/toolkit/LocalStorage.js");
|
|
6493
|
-
|
|
6494
6483
|
|
|
6495
6484
|
|
|
6496
6485
|
|
|
@@ -6527,7 +6516,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
6527
6516
|
step = _interfaces__WEBPACK_IMPORTED_MODULE_1__.LoginStep.forceTwoFactor;
|
|
6528
6517
|
}
|
|
6529
6518
|
let quickLoginState = {};
|
|
6530
|
-
const quickLoginToRegister =
|
|
6519
|
+
const quickLoginToRegister = localStorage.getItem('register-quick-login');
|
|
6531
6520
|
if (quickLoginToRegister) {
|
|
6532
6521
|
quickLoginState = {
|
|
6533
6522
|
quickLoginToRegister,
|
|
@@ -6574,14 +6563,12 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
6574
6563
|
/* 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");
|
|
6575
6564
|
/* 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");
|
|
6576
6565
|
/* harmony import */ var _interfaces__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../interfaces */ "../../dist/@frontegg/redux-store/auth/LoginState/interfaces.js");
|
|
6577
|
-
/* harmony import */ var
|
|
6578
|
-
/* harmony import */ var _toolkit__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../toolkit */ "../../dist/@frontegg/redux-store/toolkit/LocalStorage.js");
|
|
6566
|
+
/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../helpers */ "../../dist/@frontegg/redux-store/helpers/handlers.js");
|
|
6579
6567
|
|
|
6580
6568
|
|
|
6581
6569
|
const _excluded = ["callback"];
|
|
6582
6570
|
|
|
6583
6571
|
|
|
6584
|
-
|
|
6585
6572
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ((store, api, sharedActions) => {
|
|
6586
6573
|
const actions = sharedActions;
|
|
6587
6574
|
|
|
@@ -6679,7 +6666,7 @@ const _excluded = ["callback"];
|
|
|
6679
6666
|
activeTenant
|
|
6680
6667
|
}, additionalUpdate);
|
|
6681
6668
|
if (user.id) {
|
|
6682
|
-
|
|
6669
|
+
localStorage.setItem('userId', user.id);
|
|
6683
6670
|
}
|
|
6684
6671
|
setLoadingAction({
|
|
6685
6672
|
loading: false,
|
|
@@ -6692,7 +6679,7 @@ const _excluded = ["callback"];
|
|
|
6692
6679
|
} catch (e) {
|
|
6693
6680
|
setLoadingAction({
|
|
6694
6681
|
loading: false,
|
|
6695
|
-
error: (0,
|
|
6682
|
+
error: (0,_helpers__WEBPACK_IMPORTED_MODULE_3__.errorHandler)(e)
|
|
6696
6683
|
});
|
|
6697
6684
|
callback == null ? void 0 : callback(false, e);
|
|
6698
6685
|
}
|
|
@@ -7172,11 +7159,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
7172
7159
|
/* harmony export */ isEmailPayload: () => (/* binding */ isEmailPayload),
|
|
7173
7160
|
/* harmony export */ isOauthCallbackRoute: () => (/* binding */ isOauthCallbackRoute)
|
|
7174
7161
|
/* harmony export */ });
|
|
7175
|
-
/* harmony import */ var
|
|
7176
|
-
/* harmony import */ var
|
|
7177
|
-
/* harmony import */ var
|
|
7178
|
-
/* harmony import */ var _toolkit__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../toolkit */ "../../dist/@frontegg/redux-store/toolkit/WindowLocation.js");
|
|
7179
|
-
|
|
7162
|
+
/* harmony import */ var _frontegg_rest_api__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @frontegg/rest-api */ "../../node_modules/@frontegg/rest-api/auth/interfaces.js");
|
|
7163
|
+
/* harmony import */ var _frontegg_rest_api__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @frontegg/rest-api */ "../../node_modules/@frontegg/rest-api/ContextHolder/index.js");
|
|
7164
|
+
/* harmony import */ var _MfaState_interfaces__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../MfaState/interfaces */ "../../dist/@frontegg/redux-store/auth/MfaState/interfaces.js");
|
|
7180
7165
|
|
|
7181
7166
|
|
|
7182
7167
|
const isAbsoluteUrl = path => {
|
|
@@ -7188,7 +7173,7 @@ const isAbsoluteUrl = path => {
|
|
|
7188
7173
|
}
|
|
7189
7174
|
};
|
|
7190
7175
|
const isValidRedirectUrl = (redirectUrl, allowedRedirectOrigins) => {
|
|
7191
|
-
const currentUrl = new URL(
|
|
7176
|
+
const currentUrl = new URL(window.location.href);
|
|
7192
7177
|
const redirectURL = new URL(redirectUrl);
|
|
7193
7178
|
const isSameSite = redirectURL.origin === currentUrl.origin;
|
|
7194
7179
|
const isOriginInWhiteList = allowedRedirectOrigins.includes(redirectURL.origin);
|
|
@@ -7200,7 +7185,7 @@ const getRedirectUrl = ({
|
|
|
7200
7185
|
allowedRedirectOrigins,
|
|
7201
7186
|
includeQueryParam
|
|
7202
7187
|
}) => {
|
|
7203
|
-
const currentUrl = new URL(
|
|
7188
|
+
const currentUrl = new URL(window.location.href);
|
|
7204
7189
|
let redirectUrl = authenticatedUrl;
|
|
7205
7190
|
const redirectUrlQueryParam = currentUrl.searchParams.get('redirectUrl');
|
|
7206
7191
|
if (redirectUrlQueryParam) {
|
|
@@ -7214,7 +7199,7 @@ const getRedirectUrl = ({
|
|
|
7214
7199
|
}
|
|
7215
7200
|
}
|
|
7216
7201
|
} else if (includeQueryParam) {
|
|
7217
|
-
redirectUrl +=
|
|
7202
|
+
redirectUrl += window.location.search;
|
|
7218
7203
|
}
|
|
7219
7204
|
return redirectUrl;
|
|
7220
7205
|
};
|
|
@@ -7245,7 +7230,7 @@ const getPathAndSearchParamsFromUrl = url => {
|
|
|
7245
7230
|
* @returns the value of the param as string or undefined if it does not exist
|
|
7246
7231
|
*/
|
|
7247
7232
|
const getSearchParam = key => {
|
|
7248
|
-
const params = new URLSearchParams(
|
|
7233
|
+
const params = new URLSearchParams(window.location.search);
|
|
7249
7234
|
const param = params.get(key);
|
|
7250
7235
|
return param != null ? param : undefined;
|
|
7251
7236
|
};
|
|
@@ -7273,27 +7258,27 @@ const getMfaStepForEnrolledUsers = mfaDevices => {
|
|
|
7273
7258
|
} = getNumberOfMfaDevices(mfaDevices);
|
|
7274
7259
|
if (totalDevices === 1) {
|
|
7275
7260
|
if (numberOfAuthenticators) {
|
|
7276
|
-
return
|
|
7261
|
+
return _MfaState_interfaces__WEBPACK_IMPORTED_MODULE_0__.MFAStep.authenticatorApp;
|
|
7277
7262
|
} else if (numberOfPhoneDevices) {
|
|
7278
|
-
return
|
|
7263
|
+
return _MfaState_interfaces__WEBPACK_IMPORTED_MODULE_0__.MFAStep.smsVerifyCode;
|
|
7279
7264
|
} else if (numberOfEmails) {
|
|
7280
|
-
return
|
|
7265
|
+
return _MfaState_interfaces__WEBPACK_IMPORTED_MODULE_0__.MFAStep.emailVerifyCode;
|
|
7281
7266
|
}
|
|
7282
7267
|
}
|
|
7283
|
-
return
|
|
7268
|
+
return _MfaState_interfaces__WEBPACK_IMPORTED_MODULE_0__.MFAStep.verify;
|
|
7284
7269
|
};
|
|
7285
7270
|
const getMfaStepForNotEnrolledUsers = mfaStrategies => {
|
|
7286
7271
|
if (mfaStrategies.length === 1) {
|
|
7287
7272
|
const [strategy] = mfaStrategies;
|
|
7288
|
-
if (strategy ===
|
|
7289
|
-
return
|
|
7290
|
-
} else if (strategy ===
|
|
7291
|
-
return
|
|
7292
|
-
} else if (strategy ===
|
|
7293
|
-
return
|
|
7273
|
+
if (strategy === _frontegg_rest_api__WEBPACK_IMPORTED_MODULE_1__.MFAStrategyEnum.AuthenticatorApp) {
|
|
7274
|
+
return _MfaState_interfaces__WEBPACK_IMPORTED_MODULE_0__.MFAStep.authenticatorApp;
|
|
7275
|
+
} else if (strategy === _frontegg_rest_api__WEBPACK_IMPORTED_MODULE_1__.MFAStrategyEnum.SMS) {
|
|
7276
|
+
return _MfaState_interfaces__WEBPACK_IMPORTED_MODULE_0__.MFAStep.smsSetPhoneNumber;
|
|
7277
|
+
} else if (strategy === _frontegg_rest_api__WEBPACK_IMPORTED_MODULE_1__.MFAStrategyEnum.EmailCode) {
|
|
7278
|
+
return _MfaState_interfaces__WEBPACK_IMPORTED_MODULE_0__.MFAStep.emailVerifyCode;
|
|
7294
7279
|
}
|
|
7295
7280
|
}
|
|
7296
|
-
return
|
|
7281
|
+
return _MfaState_interfaces__WEBPACK_IMPORTED_MODULE_0__.MFAStep.verify;
|
|
7297
7282
|
};
|
|
7298
7283
|
const isOauthCallbackRoute = activeUri => {
|
|
7299
7284
|
return activeUri === '/oauth/callback';
|
|
@@ -7302,7 +7287,7 @@ function isEmailPayload(payload) {
|
|
|
7302
7287
|
return 'email' in payload;
|
|
7303
7288
|
}
|
|
7304
7289
|
const getBaseNameWithoutSlashSuffix = state => {
|
|
7305
|
-
const basename =
|
|
7290
|
+
const basename = _frontegg_rest_api__WEBPACK_IMPORTED_MODULE_2__.ContextHolder.for(state.root.appName).getBasename();
|
|
7306
7291
|
if (basename != null && basename.endsWith('/')) {
|
|
7307
7292
|
return basename.slice(0, -1);
|
|
7308
7293
|
}
|
|
@@ -9421,8 +9406,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
9421
9406
|
/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../helpers */ "../../dist/@frontegg/redux-store/helpers/handlers.js");
|
|
9422
9407
|
/* harmony import */ var _state__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./state */ "../../dist/@frontegg/redux-store/auth/PasskeysState/state.js");
|
|
9423
9408
|
/* harmony import */ var _frontegg_rest_api__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @frontegg/rest-api */ "../../node_modules/@frontegg/rest-api/auth/interfaces.js");
|
|
9424
|
-
/* harmony import */ var _toolkit__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../toolkit */ "../../dist/@frontegg/redux-store/toolkit/LocalStorage.js");
|
|
9425
|
-
|
|
9426
9409
|
|
|
9427
9410
|
|
|
9428
9411
|
|
|
@@ -9501,8 +9484,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
9501
9484
|
policy
|
|
9502
9485
|
} = publicAuthStrategyPolicy;
|
|
9503
9486
|
const isPasskeysEnabledByVendor = await getPasskeysVendorPolicy(policy);
|
|
9504
|
-
const isLoggedInWithPasskeys =
|
|
9505
|
-
const isMarkedDontShowAgainPrompt =
|
|
9487
|
+
const isLoggedInWithPasskeys = localStorage.getItem('preferred-login-method') === 'Passkeys';
|
|
9488
|
+
const isMarkedDontShowAgainPrompt = localStorage.getItem('dont-show-again-prompt-passkeys') === 'true';
|
|
9506
9489
|
const [showPasskeys] = await actions.getFeatureFlags(['show-passkeys-new']);
|
|
9507
9490
|
if (!showPasskeys || !isPasskeysEnabledByVendor || isLoggedInWithPasskeys || isMarkedDontShowAgainPrompt) {
|
|
9508
9491
|
return false;
|
|
@@ -13363,7 +13346,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
13363
13346
|
/* harmony import */ var _state__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./state */ "../../dist/@frontegg/redux-store/auth/SocialLoginState/state.js");
|
|
13364
13347
|
/* harmony import */ var _interfaces__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../interfaces */ "../../dist/@frontegg/redux-store/auth/interfaces.js");
|
|
13365
13348
|
/* harmony import */ var _helpers_gtm__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../helpers/gtm */ "../../dist/@frontegg/redux-store/helpers/gtm.js");
|
|
13366
|
-
/* harmony import */ var _toolkit__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../toolkit */ "../../dist/@frontegg/redux-store/toolkit/LocalStorage.js");
|
|
13367
13349
|
|
|
13368
13350
|
|
|
13369
13351
|
const _excluded = ["authorizationUrl"],
|
|
@@ -13372,7 +13354,6 @@ const _excluded = ["authorizationUrl"],
|
|
|
13372
13354
|
|
|
13373
13355
|
|
|
13374
13356
|
|
|
13375
|
-
|
|
13376
13357
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ((store, api, sharedActions) => {
|
|
13377
13358
|
const actions = sharedActions;
|
|
13378
13359
|
|
|
@@ -13500,14 +13481,14 @@ const _excluded = ["authorizationUrl"],
|
|
|
13500
13481
|
(0,_helpers_gtm__WEBPACK_IMPORTED_MODULE_6__.reportGTMEvent)(_helpers_gtm__WEBPACK_IMPORTED_MODULE_6__.GTMEventAction.USER_VERIFIED, userVerifiedPayload);
|
|
13501
13482
|
}
|
|
13502
13483
|
if (userId) {
|
|
13503
|
-
|
|
13484
|
+
localStorage.setItem('userId', userId);
|
|
13504
13485
|
}
|
|
13505
13486
|
actions.setLoginState({
|
|
13506
13487
|
email,
|
|
13507
13488
|
isNewUser
|
|
13508
13489
|
});
|
|
13509
|
-
|
|
13510
|
-
|
|
13490
|
+
actions.refreshTokenForSocialLogins();
|
|
13491
|
+
localStorage.removeItem('register-quick-login');
|
|
13511
13492
|
setSocialLoginsState({
|
|
13512
13493
|
loading: false
|
|
13513
13494
|
});
|
|
@@ -13565,13 +13546,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
13565
13546
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
13566
13547
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
13567
13548
|
/* harmony export */ });
|
|
13568
|
-
/* harmony import */ var
|
|
13549
|
+
/* harmony import */ var _frontegg_rest_api__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @frontegg/rest-api */ "../../node_modules/@frontegg/rest-api/ContextHolder/index.js");
|
|
13569
13550
|
/* harmony import */ var _LoginState_helpers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../LoginState/helpers */ "../../dist/@frontegg/redux-store/auth/LoginState/helpers.js");
|
|
13570
13551
|
/* harmony import */ var _MfaState_interfaces__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../MfaState/interfaces */ "../../dist/@frontegg/redux-store/auth/MfaState/interfaces.js");
|
|
13571
|
-
/* harmony import */ var
|
|
13572
|
-
/* harmony import */ var _toolkit__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../toolkit */ "../../dist/@frontegg/redux-store/toolkit/LocalStorage.js");
|
|
13573
|
-
|
|
13574
|
-
|
|
13552
|
+
/* harmony import */ var _consts__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../consts */ "../../dist/@frontegg/redux-store/auth/StepUpState/consts.js");
|
|
13575
13553
|
|
|
13576
13554
|
|
|
13577
13555
|
|
|
@@ -13633,9 +13611,9 @@ const isMfaIsNotEnrolledError = error => (error == null ? void 0 : error['messag
|
|
|
13633
13611
|
});
|
|
13634
13612
|
return;
|
|
13635
13613
|
}
|
|
13636
|
-
|
|
13614
|
+
window.localStorage.setItem(_consts__WEBPACK_IMPORTED_MODULE_2__.SHOULD_STEP_UP_KEY, 'true');
|
|
13637
13615
|
const routes = store.auth.routes;
|
|
13638
|
-
|
|
13616
|
+
_frontegg_rest_api__WEBPACK_IMPORTED_MODULE_3__.ContextHolder.for(store.root.appName).onRedirectTo(routes.logoutUrl, {
|
|
13639
13617
|
preserveQueryParams: true
|
|
13640
13618
|
});
|
|
13641
13619
|
};
|
|
@@ -13809,8 +13787,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
13809
13787
|
/* harmony export */ });
|
|
13810
13788
|
/* harmony import */ var _consts__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../consts */ "../../dist/@frontegg/redux-store/auth/StepUpState/consts.js");
|
|
13811
13789
|
/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../helpers */ "../../dist/@frontegg/redux-store/auth/StepUpState/helpers.js");
|
|
13812
|
-
/* harmony import */ var _toolkit__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../toolkit */ "../../dist/@frontegg/redux-store/toolkit/LocalStorage.js");
|
|
13813
|
-
|
|
13814
13790
|
|
|
13815
13791
|
|
|
13816
13792
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ((store, api, sharedActions) => {
|
|
@@ -13835,8 +13811,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
13835
13811
|
if (alias) {
|
|
13836
13812
|
params['organization'] = alias;
|
|
13837
13813
|
}
|
|
13838
|
-
|
|
13839
|
-
|
|
13814
|
+
(0,_helpers__WEBPACK_IMPORTED_MODULE_1__.setAfterAuthRedirectUrlForStepUp)();
|
|
13815
|
+
window.localStorage.setItem(_consts__WEBPACK_IMPORTED_MODULE_0__.SHOULD_STEP_UP_KEY, 'true');
|
|
13840
13816
|
await actions.__requestHostedLoginAuthorize(params);
|
|
13841
13817
|
};
|
|
13842
13818
|
return {
|
|
@@ -13902,11 +13878,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
13902
13878
|
/* harmony export */ redirectByStepUpUrl: () => (/* binding */ redirectByStepUpUrl),
|
|
13903
13879
|
/* harmony export */ setAfterAuthRedirectUrlForStepUp: () => (/* binding */ setAfterAuthRedirectUrlForStepUp)
|
|
13904
13880
|
/* harmony export */ });
|
|
13905
|
-
/* harmony import */ var
|
|
13881
|
+
/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../constants */ "../../dist/@frontegg/redux-store/constants.js");
|
|
13906
13882
|
/* harmony import */ var _consts__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./consts */ "../../dist/@frontegg/redux-store/auth/StepUpState/consts.js");
|
|
13907
|
-
/* harmony import */ var _toolkit__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../toolkit */ "../../dist/@frontegg/redux-store/toolkit/WindowLocation.js");
|
|
13908
|
-
/* harmony import */ var _toolkit__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../toolkit */ "../../dist/@frontegg/redux-store/toolkit/LocalStorage.js");
|
|
13909
|
-
|
|
13910
13883
|
|
|
13911
13884
|
|
|
13912
13885
|
/**
|
|
@@ -13939,9 +13912,9 @@ const isSteppedUp = (user, {
|
|
|
13939
13912
|
/**
|
|
13940
13913
|
* Set the url and query params in the local storage FRONTEGG_AFTER_AUTH_REDIRECT_URL value
|
|
13941
13914
|
*/
|
|
13942
|
-
|
|
13943
|
-
const encodedRedirectUrl =
|
|
13944
|
-
|
|
13915
|
+
function setAfterAuthRedirectUrlForStepUp() {
|
|
13916
|
+
const encodedRedirectUrl = window.location.pathname + window.location.search;
|
|
13917
|
+
window.localStorage.setItem(_constants__WEBPACK_IMPORTED_MODULE_1__.FRONTEGG_AFTER_AUTH_REDIRECT_URL, encodedRedirectUrl);
|
|
13945
13918
|
}
|
|
13946
13919
|
|
|
13947
13920
|
/**
|
|
@@ -13951,9 +13924,9 @@ async function setAfterAuthRedirectUrlForStepUp() {
|
|
|
13951
13924
|
* @param onRedirectTo - redirect to function
|
|
13952
13925
|
* @param maxAge - max age of step up
|
|
13953
13926
|
*/
|
|
13954
|
-
const redirectByStepUpUrl =
|
|
13955
|
-
|
|
13956
|
-
const searchParams = new URLSearchParams(
|
|
13927
|
+
const redirectByStepUpUrl = (stepUpUrl, onRedirectTo, maxAge) => {
|
|
13928
|
+
setAfterAuthRedirectUrlForStepUp();
|
|
13929
|
+
const searchParams = new URLSearchParams(window.location.search);
|
|
13957
13930
|
if (maxAge) {
|
|
13958
13931
|
searchParams.set(_consts__WEBPACK_IMPORTED_MODULE_0__.STEP_UP_MAX_AGE_PARAM_NAME, maxAge.toString());
|
|
13959
13932
|
}
|
|
@@ -16969,10 +16942,8 @@ let GTMEventAction;
|
|
|
16969
16942
|
* @param payload
|
|
16970
16943
|
*/
|
|
16971
16944
|
function reportGTMEvent(action, payload) {
|
|
16972
|
-
|
|
16973
|
-
|
|
16974
|
-
(_window$onFronteggEve = (_window = window).onFronteggEvent) == null ? void 0 : _window$onFronteggEve.call(_window, action, payload);
|
|
16975
|
-
}
|
|
16945
|
+
var _window$onFronteggEve, _window;
|
|
16946
|
+
(_window$onFronteggEve = (_window = window).onFronteggEvent) == null ? void 0 : _window$onFronteggEve.call(_window, action, payload);
|
|
16976
16947
|
}
|
|
16977
16948
|
|
|
16978
16949
|
/***/ }),
|
|
@@ -17075,8 +17046,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
17075
17046
|
/* harmony export */ generateCodeChallengePureJs: () => (/* binding */ generateCodeChallengePureJs)
|
|
17076
17047
|
/* harmony export */ });
|
|
17077
17048
|
/* harmony import */ var _sha256__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./sha256 */ "../../dist/@frontegg/redux-store/helpers/sha256.js");
|
|
17078
|
-
/* harmony import */ var _toolkit__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../toolkit */ "../../dist/@frontegg/redux-store/toolkit/WindowLocation.js");
|
|
17079
|
-
|
|
17080
17049
|
|
|
17081
17050
|
async function generateCodeChallengePureJs(codeVerifier) {
|
|
17082
17051
|
// noinspection TypeScriptValidateJSTypes pure sha256 recevie single params alg name
|
|
@@ -17093,7 +17062,7 @@ async function generateCodeChallenge(codeVerifier) {
|
|
|
17093
17062
|
if ((_window$crypto = window.crypto) != null && (_window$crypto$subtle = _window$crypto.subtle) != null && _window$crypto$subtle.digest) {
|
|
17094
17063
|
return generateCodeChallengeNative(codeVerifier);
|
|
17095
17064
|
} else {
|
|
17096
|
-
console.warn('Generating CodeChallenge in non-secure domain:',
|
|
17065
|
+
console.warn('Generating CodeChallenge in non-secure domain:', window.location.origin);
|
|
17097
17066
|
return generateCodeChallengePureJs(codeVerifier);
|
|
17098
17067
|
}
|
|
17099
17068
|
}
|
|
@@ -17575,7 +17544,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
17575
17544
|
/* harmony export */ GroupsStateKeys: () => (/* reexport safe */ _toolkit__WEBPACK_IMPORTED_MODULE_0__.GroupsStateKeys),
|
|
17576
17545
|
/* harmony export */ HOSTED_LOGIN_VERIFIER_KEY: () => (/* reexport safe */ _constants__WEBPACK_IMPORTED_MODULE_1__.HOSTED_LOGIN_VERIFIER_KEY),
|
|
17577
17546
|
/* harmony export */ ImpersonateStep: () => (/* reexport safe */ _toolkit__WEBPACK_IMPORTED_MODULE_0__.ImpersonateStep),
|
|
17578
|
-
/* harmony export */ LocalStorage: () => (/* reexport safe */ _toolkit__WEBPACK_IMPORTED_MODULE_0__.LocalStorage),
|
|
17579
17547
|
/* harmony export */ LoginActionTypes: () => (/* reexport safe */ _toolkit__WEBPACK_IMPORTED_MODULE_0__.LoginActionTypes),
|
|
17580
17548
|
/* harmony export */ LoginFlow: () => (/* reexport safe */ _toolkit__WEBPACK_IMPORTED_MODULE_0__.LoginFlow),
|
|
17581
17549
|
/* harmony export */ LoginStep: () => (/* reexport safe */ _toolkit__WEBPACK_IMPORTED_MODULE_0__.LoginStep),
|
|
@@ -17591,14 +17559,12 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
17591
17559
|
/* harmony export */ STEP_UP_MAX_AGE_PARAM_NAME: () => (/* reexport safe */ _constants__WEBPACK_IMPORTED_MODULE_1__.STEP_UP_MAX_AGE_PARAM_NAME),
|
|
17592
17560
|
/* harmony export */ SamlVendors: () => (/* reexport safe */ _toolkit__WEBPACK_IMPORTED_MODULE_0__.SamlVendors),
|
|
17593
17561
|
/* harmony export */ SecurityCenterStateKeys: () => (/* reexport safe */ _toolkit__WEBPACK_IMPORTED_MODULE_0__.SecurityCenterStateKeys),
|
|
17594
|
-
/* harmony export */ SessionStorage: () => (/* reexport safe */ _toolkit__WEBPACK_IMPORTED_MODULE_0__.SessionStorage),
|
|
17595
17562
|
/* harmony export */ SignUpStage: () => (/* reexport safe */ _toolkit__WEBPACK_IMPORTED_MODULE_0__.SignUpStage),
|
|
17596
17563
|
/* harmony export */ SubscriptionCancellationPolicy: () => (/* reexport safe */ _subscriptions_interfaces__WEBPACK_IMPORTED_MODULE_6__.SubscriptionCancellationPolicy),
|
|
17597
17564
|
/* harmony export */ SubscriptionStatus: () => (/* reexport safe */ _subscriptions_interfaces__WEBPACK_IMPORTED_MODULE_6__.SubscriptionStatus),
|
|
17598
17565
|
/* harmony export */ TENANT_ID_PARAM_KEY: () => (/* reexport safe */ _auth_helpers__WEBPACK_IMPORTED_MODULE_3__.TENANT_ID_PARAM_KEY),
|
|
17599
17566
|
/* harmony export */ TeamStateKeys: () => (/* reexport safe */ _toolkit__WEBPACK_IMPORTED_MODULE_0__.TeamStateKeys),
|
|
17600
17567
|
/* harmony export */ UserVeirifedOriginTypes: () => (/* reexport safe */ _toolkit__WEBPACK_IMPORTED_MODULE_0__.UserVeirifedOriginTypes),
|
|
17601
|
-
/* harmony export */ WindowLocation: () => (/* reexport safe */ _toolkit__WEBPACK_IMPORTED_MODULE_0__.WindowLocation),
|
|
17602
17568
|
/* harmony export */ authStrategyLoginStepMap: () => (/* reexport safe */ _constants__WEBPACK_IMPORTED_MODULE_1__.authStrategyLoginStepMap),
|
|
17603
17569
|
/* harmony export */ base64ToFormData: () => (/* reexport safe */ _helpers__WEBPACK_IMPORTED_MODULE_2__.base64ToFormData),
|
|
17604
17570
|
/* harmony export */ base64urlDecode: () => (/* reexport safe */ _helpers__WEBPACK_IMPORTED_MODULE_2__.base64urlDecode),
|
|
@@ -17667,7 +17633,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
17667
17633
|
/* harmony import */ var _subscriptions_interfaces__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./subscriptions/interfaces */ "../../dist/@frontegg/redux-store/subscriptions/interfaces.js");
|
|
17668
17634
|
/* harmony import */ var _vendor__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./vendor */ "../../dist/@frontegg/redux-store/vendor/index.js");
|
|
17669
17635
|
/* harmony import */ var _audits__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./audits */ "../../dist/@frontegg/redux-store/audits/index.js");
|
|
17670
|
-
/** @license Frontegg v7.
|
|
17636
|
+
/** @license Frontegg v7.12.0
|
|
17671
17637
|
*
|
|
17672
17638
|
* This source code is licensed under the MIT license found in the
|
|
17673
17639
|
* LICENSE file in the root directory of this source tree.
|
|
@@ -23829,9 +23795,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
23829
23795
|
class FronteggNativeModule {
|
|
23830
23796
|
constructor() {
|
|
23831
23797
|
this.loginWithSSO = email => {
|
|
23832
|
-
if (typeof window == 'undefined') {
|
|
23833
|
-
throw new Error('FronteggNativeBridge is not available');
|
|
23834
|
-
}
|
|
23835
23798
|
if (this.isWebkitAvailable()) {
|
|
23836
23799
|
var _window$webkit, _window$webkit$messag, _window$webkit$messag2;
|
|
23837
23800
|
(_window$webkit = window.webkit) == null ? void 0 : (_window$webkit$messag = _window$webkit.messageHandlers) == null ? void 0 : (_window$webkit$messag2 = _window$webkit$messag.FronteggNativeBridge) == null ? void 0 : _window$webkit$messag2.postMessage(JSON.stringify({
|
|
@@ -23846,9 +23809,6 @@ class FronteggNativeModule {
|
|
|
23846
23809
|
}
|
|
23847
23810
|
};
|
|
23848
23811
|
this.loginWithSocialLogin = url => {
|
|
23849
|
-
if (typeof window == 'undefined') {
|
|
23850
|
-
throw new Error('FronteggNativeBridge is not available');
|
|
23851
|
-
}
|
|
23852
23812
|
if (this.isWebkitAvailable()) {
|
|
23853
23813
|
var _window$webkit2, _window$webkit2$messa, _window$webkit2$messa2;
|
|
23854
23814
|
(_window$webkit2 = window.webkit) == null ? void 0 : (_window$webkit2$messa = _window$webkit2.messageHandlers) == null ? void 0 : (_window$webkit2$messa2 = _window$webkit2$messa.FronteggNativeBridge) == null ? void 0 : _window$webkit2$messa2.postMessage(JSON.stringify({
|
|
@@ -23864,15 +23824,15 @@ class FronteggNativeModule {
|
|
|
23864
23824
|
};
|
|
23865
23825
|
this.promptSocialLoginConsent = () => {
|
|
23866
23826
|
var _window$FronteggNativ3, _window$FronteggNativ4;
|
|
23867
|
-
return
|
|
23827
|
+
return (_window$FronteggNativ3 = (_window$FronteggNativ4 = window.FronteggNativeBridgeFunctions) == null ? void 0 : _window$FronteggNativ4['shouldPromptSocialLoginConsent']) != null ? _window$FronteggNativ3 : false;
|
|
23868
23828
|
};
|
|
23869
23829
|
}
|
|
23870
23830
|
isWebkitAvailable() {
|
|
23871
23831
|
var _window$webkit3, _window$webkit3$messa;
|
|
23872
|
-
return
|
|
23832
|
+
return ((_window$webkit3 = window.webkit) == null ? void 0 : (_window$webkit3$messa = _window$webkit3.messageHandlers) == null ? void 0 : _window$webkit3$messa.FronteggNativeBridge) != null;
|
|
23873
23833
|
}
|
|
23874
23834
|
isJsInterfaceAvailable() {
|
|
23875
|
-
return
|
|
23835
|
+
return window.FronteggNativeBridge != null;
|
|
23876
23836
|
}
|
|
23877
23837
|
isSocialLoginAvailable() {
|
|
23878
23838
|
return this.isAvailable('loginWithSocialLogin');
|
|
@@ -23881,7 +23841,7 @@ class FronteggNativeModule {
|
|
|
23881
23841
|
return this.isAvailable('loginWithSSO');
|
|
23882
23842
|
}
|
|
23883
23843
|
isAvailable(method) {
|
|
23884
|
-
if (
|
|
23844
|
+
if (this.isWebkitAvailable() || this.isJsInterfaceAvailable()) {
|
|
23885
23845
|
var _window$FronteggNativ5, _window$FronteggNativ6;
|
|
23886
23846
|
return (_window$FronteggNativ5 = (_window$FronteggNativ6 = window.FronteggNativeBridgeFunctions) == null ? void 0 : _window$FronteggNativ6[method]) != null ? _window$FronteggNativ5 : false;
|
|
23887
23847
|
}
|
|
@@ -23892,486 +23852,6 @@ class FronteggNativeModule {
|
|
|
23892
23852
|
|
|
23893
23853
|
/***/ }),
|
|
23894
23854
|
|
|
23895
|
-
/***/ "../../dist/@frontegg/redux-store/toolkit/LocalStorage.js":
|
|
23896
|
-
/*!****************************************************************!*\
|
|
23897
|
-
!*** ../../dist/@frontegg/redux-store/toolkit/LocalStorage.js ***!
|
|
23898
|
-
\****************************************************************/
|
|
23899
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
23900
|
-
|
|
23901
|
-
"use strict";
|
|
23902
|
-
__webpack_require__.r(__webpack_exports__);
|
|
23903
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
23904
|
-
/* harmony export */ LocalStorage: () => (/* binding */ LocalStorage)
|
|
23905
|
-
/* harmony export */ });
|
|
23906
|
-
/**
|
|
23907
|
-
* LocalStorage is a singleton instance proxy that is responsible for managing the local storage of the application.
|
|
23908
|
-
* It can be overridden by a framework or application to provide a custom implementation for mobile or server-side rendering.
|
|
23909
|
-
*/
|
|
23910
|
-
class LocalStorage {
|
|
23911
|
-
constructor() {
|
|
23912
|
-
this.nativeInstance = typeof window !== 'undefined' ? window.localStorage : typeof __webpack_require__.g !== 'undefined' ? __webpack_require__.g.localStorage : null;
|
|
23913
|
-
this.getItem = async key => {
|
|
23914
|
-
return Promise.resolve(this.nativeInstance.getItem(key));
|
|
23915
|
-
};
|
|
23916
|
-
this.setItem = async (key, value) => {
|
|
23917
|
-
return Promise.resolve(this.nativeInstance.setItem(key, value));
|
|
23918
|
-
};
|
|
23919
|
-
this.removeItem = async key => {
|
|
23920
|
-
return Promise.resolve(this.nativeInstance.removeItem(key));
|
|
23921
|
-
};
|
|
23922
|
-
this.clear = async () => {
|
|
23923
|
-
return Promise.resolve(this.nativeInstance.clear());
|
|
23924
|
-
};
|
|
23925
|
-
}
|
|
23926
|
-
/**
|
|
23927
|
-
* Retrieves the singleton instance of LocalStorage.
|
|
23928
|
-
* If an instance has been overridden, it returns the overridden instance.
|
|
23929
|
-
* Otherwise, it creates and returns a default instance.
|
|
23930
|
-
*/
|
|
23931
|
-
static getInstance() {
|
|
23932
|
-
if (!LocalStorage.instance) {
|
|
23933
|
-
LocalStorage.instance = new LocalStorage();
|
|
23934
|
-
}
|
|
23935
|
-
return LocalStorage.instance;
|
|
23936
|
-
}
|
|
23937
|
-
|
|
23938
|
-
/**
|
|
23939
|
-
* Overrides the current LocalStorage instance with a custom implementation.
|
|
23940
|
-
* This can be used to provide a different storage mechanism for mobile or server-side environments.
|
|
23941
|
-
* @param customInstance The custom implementation of LocalStorage.
|
|
23942
|
-
*/
|
|
23943
|
-
static overrideInstance(customInstance) {
|
|
23944
|
-
LocalStorage.instance.nativeInstance = customInstance;
|
|
23945
|
-
}
|
|
23946
|
-
|
|
23947
|
-
/**
|
|
23948
|
-
* Retrieves a value from local storage asynchronously.
|
|
23949
|
-
* @param key The key of the value to retrieve.
|
|
23950
|
-
* @returns The value associated with the key, or null if the key does not exist.
|
|
23951
|
-
*/
|
|
23952
|
-
static async getItem(key) {
|
|
23953
|
-
return LocalStorage.getInstance().getItem(key);
|
|
23954
|
-
}
|
|
23955
|
-
|
|
23956
|
-
/**
|
|
23957
|
-
* Stores a value in local storage asynchronously.
|
|
23958
|
-
* @param key The key under which the value will be stored.
|
|
23959
|
-
* @param value The value to store.
|
|
23960
|
-
*/
|
|
23961
|
-
static async setItem(key, value) {
|
|
23962
|
-
return LocalStorage.getInstance().setItem(key, value);
|
|
23963
|
-
}
|
|
23964
|
-
|
|
23965
|
-
/**
|
|
23966
|
-
* Removes a value from local storage asynchronously.
|
|
23967
|
-
* @param key The key of the value to remove.
|
|
23968
|
-
*/
|
|
23969
|
-
static async removeItem(key) {
|
|
23970
|
-
return LocalStorage.getInstance().removeItem(key);
|
|
23971
|
-
}
|
|
23972
|
-
|
|
23973
|
-
/**
|
|
23974
|
-
* Clears all key-value pairs from local storage asynchronously.
|
|
23975
|
-
*/
|
|
23976
|
-
static async clear() {
|
|
23977
|
-
return LocalStorage.getInstance().clear();
|
|
23978
|
-
}
|
|
23979
|
-
|
|
23980
|
-
// Instance methods for custom implementations
|
|
23981
|
-
}
|
|
23982
|
-
LocalStorage.instance = void 0;
|
|
23983
|
-
|
|
23984
|
-
/***/ }),
|
|
23985
|
-
|
|
23986
|
-
/***/ "../../dist/@frontegg/redux-store/toolkit/SessionStorage.js":
|
|
23987
|
-
/*!******************************************************************!*\
|
|
23988
|
-
!*** ../../dist/@frontegg/redux-store/toolkit/SessionStorage.js ***!
|
|
23989
|
-
\******************************************************************/
|
|
23990
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
23991
|
-
|
|
23992
|
-
"use strict";
|
|
23993
|
-
__webpack_require__.r(__webpack_exports__);
|
|
23994
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
23995
|
-
/* harmony export */ SessionStorage: () => (/* binding */ SessionStorage)
|
|
23996
|
-
/* harmony export */ });
|
|
23997
|
-
/**
|
|
23998
|
-
* SessionStorage is a singleton instance proxy that is responsible for managing the session storage of the application.
|
|
23999
|
-
* It can be overridden by a framework or application to provide a custom implementation for mobile or server-side rendering.
|
|
24000
|
-
*/
|
|
24001
|
-
class SessionStorage {
|
|
24002
|
-
constructor() {
|
|
24003
|
-
this.nativeInstance = typeof window !== 'undefined' ? window.sessionStorage : typeof __webpack_require__.g !== 'undefined' ? __webpack_require__.g.sessionStorage : null;
|
|
24004
|
-
this.getItem = async key => {
|
|
24005
|
-
return Promise.resolve(this.nativeInstance.getItem(key));
|
|
24006
|
-
};
|
|
24007
|
-
this.setItem = async (key, value) => {
|
|
24008
|
-
return Promise.resolve(this.nativeInstance.setItem(key, value));
|
|
24009
|
-
};
|
|
24010
|
-
this.removeItem = async key => {
|
|
24011
|
-
return Promise.resolve(this.nativeInstance.removeItem(key));
|
|
24012
|
-
};
|
|
24013
|
-
this.clear = async () => {
|
|
24014
|
-
return Promise.resolve(this.nativeInstance.clear());
|
|
24015
|
-
};
|
|
24016
|
-
}
|
|
24017
|
-
/**
|
|
24018
|
-
* Retrieves the singleton instance of SessionStorage.
|
|
24019
|
-
* If an instance has been overridden, it returns the overridden instance.
|
|
24020
|
-
* Otherwise, it creates and returns a default instance.
|
|
24021
|
-
*/
|
|
24022
|
-
static getInstance() {
|
|
24023
|
-
if (!SessionStorage.instance) {
|
|
24024
|
-
SessionStorage.instance = new SessionStorage();
|
|
24025
|
-
}
|
|
24026
|
-
return SessionStorage.instance;
|
|
24027
|
-
}
|
|
24028
|
-
|
|
24029
|
-
/**
|
|
24030
|
-
* Overrides the current SessionStorage instance with a custom implementation.
|
|
24031
|
-
* This can be used to provide a different storage mechanism for mobile or server-side environments.
|
|
24032
|
-
* @param customInstance The custom implementation of SessionStorage.
|
|
24033
|
-
*/
|
|
24034
|
-
static overrideInstance(customInstance) {
|
|
24035
|
-
SessionStorage.instance.nativeInstance = customInstance;
|
|
24036
|
-
}
|
|
24037
|
-
|
|
24038
|
-
/**
|
|
24039
|
-
* Retrieves a value from session storage asynchronously.
|
|
24040
|
-
* @param key The key of the value to retrieve.
|
|
24041
|
-
* @returns The value associated with the key, or null if the key does not exist.
|
|
24042
|
-
*/
|
|
24043
|
-
static async getItem(key) {
|
|
24044
|
-
return SessionStorage.getInstance().getItem(key);
|
|
24045
|
-
}
|
|
24046
|
-
|
|
24047
|
-
/**
|
|
24048
|
-
* Stores a value in session storage asynchronously.
|
|
24049
|
-
* @param key The key under which the value will be stored.
|
|
24050
|
-
* @param value The value to store.
|
|
24051
|
-
*/
|
|
24052
|
-
static async setItem(key, value) {
|
|
24053
|
-
return SessionStorage.getInstance().setItem(key, value);
|
|
24054
|
-
}
|
|
24055
|
-
|
|
24056
|
-
/**
|
|
24057
|
-
* Removes a value from session storage asynchronously.
|
|
24058
|
-
* @param key The key of the value to remove.
|
|
24059
|
-
*/
|
|
24060
|
-
static async removeItem(key) {
|
|
24061
|
-
return SessionStorage.getInstance().removeItem(key);
|
|
24062
|
-
}
|
|
24063
|
-
|
|
24064
|
-
/**
|
|
24065
|
-
* Clears all key-value pairs from session storage asynchronously.
|
|
24066
|
-
*/
|
|
24067
|
-
static async clear() {
|
|
24068
|
-
return SessionStorage.getInstance().clear();
|
|
24069
|
-
}
|
|
24070
|
-
|
|
24071
|
-
// Instance methods for custom implementations
|
|
24072
|
-
}
|
|
24073
|
-
SessionStorage.instance = void 0;
|
|
24074
|
-
|
|
24075
|
-
/***/ }),
|
|
24076
|
-
|
|
24077
|
-
/***/ "../../dist/@frontegg/redux-store/toolkit/WindowLocation.js":
|
|
24078
|
-
/*!******************************************************************!*\
|
|
24079
|
-
!*** ../../dist/@frontegg/redux-store/toolkit/WindowLocation.js ***!
|
|
24080
|
-
\******************************************************************/
|
|
24081
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
24082
|
-
|
|
24083
|
-
"use strict";
|
|
24084
|
-
__webpack_require__.r(__webpack_exports__);
|
|
24085
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
24086
|
-
/* harmony export */ WindowLocation: () => (/* binding */ WindowLocation)
|
|
24087
|
-
/* harmony export */ });
|
|
24088
|
-
/**
|
|
24089
|
-
* WindowLocation is a singleton instance proxy that is responsible for managing location-related operations.
|
|
24090
|
-
* It can be overridden by a framework or application to provide a custom implementation for mobile or server-side rendering.
|
|
24091
|
-
*/
|
|
24092
|
-
class WindowLocation {
|
|
24093
|
-
constructor() {
|
|
24094
|
-
this.nativeInstance = typeof window !== 'undefined' ? window.location : typeof __webpack_require__.g !== 'undefined' ? __webpack_require__.g.location : null;
|
|
24095
|
-
}
|
|
24096
|
-
/**
|
|
24097
|
-
* Retrieves the singleton instance of WindowLocation.
|
|
24098
|
-
* If an instance has been overridden, it returns the overridden instance.
|
|
24099
|
-
* Otherwise, it creates and returns a default instance.
|
|
24100
|
-
*/
|
|
24101
|
-
static getInstance() {
|
|
24102
|
-
if (!WindowLocation.instance) {
|
|
24103
|
-
WindowLocation.instance = new WindowLocation();
|
|
24104
|
-
}
|
|
24105
|
-
return WindowLocation.instance;
|
|
24106
|
-
}
|
|
24107
|
-
|
|
24108
|
-
/**
|
|
24109
|
-
* Overrides the current WindowLocation instance with a custom implementation.
|
|
24110
|
-
* This can be used to provide a different mechanism for handling location in mobile or server-side environments.
|
|
24111
|
-
* @param customInstance The custom implementation of WindowLocation.
|
|
24112
|
-
*/
|
|
24113
|
-
static overrideInstance(customInstance) {
|
|
24114
|
-
WindowLocation.instance.nativeInstance = customInstance;
|
|
24115
|
-
}
|
|
24116
|
-
|
|
24117
|
-
// Static getters and setters
|
|
24118
|
-
|
|
24119
|
-
/**
|
|
24120
|
-
* Retrieves the origins of the ancestor browsing contexts as a DOMStringList.
|
|
24121
|
-
*/
|
|
24122
|
-
static get ancestorOrigins() {
|
|
24123
|
-
return WindowLocation.getInstance().ancestorOrigins;
|
|
24124
|
-
}
|
|
24125
|
-
|
|
24126
|
-
/**
|
|
24127
|
-
* Retrieves the fragment identifier (hash) of the current URL.
|
|
24128
|
-
* Can be set to navigate to the same URL with a different fragment.
|
|
24129
|
-
*/
|
|
24130
|
-
static get hash() {
|
|
24131
|
-
return WindowLocation.getInstance().hash;
|
|
24132
|
-
}
|
|
24133
|
-
static set hash(value) {
|
|
24134
|
-
WindowLocation.getInstance().hash = value;
|
|
24135
|
-
}
|
|
24136
|
-
|
|
24137
|
-
/**
|
|
24138
|
-
* Retrieves the host (hostname and port) of the current URL.
|
|
24139
|
-
* Can be set to navigate to the same URL with a different host and port.
|
|
24140
|
-
*/
|
|
24141
|
-
static get host() {
|
|
24142
|
-
return WindowLocation.getInstance().host;
|
|
24143
|
-
}
|
|
24144
|
-
static set host(value) {
|
|
24145
|
-
WindowLocation.getInstance().host = value;
|
|
24146
|
-
}
|
|
24147
|
-
|
|
24148
|
-
/**
|
|
24149
|
-
* Retrieves the hostname of the current URL.
|
|
24150
|
-
* Can be set to navigate to the same URL with a different hostname.
|
|
24151
|
-
*/
|
|
24152
|
-
static get hostname() {
|
|
24153
|
-
return WindowLocation.getInstance().hostname;
|
|
24154
|
-
}
|
|
24155
|
-
static set hostname(value) {
|
|
24156
|
-
WindowLocation.getInstance().hostname = value;
|
|
24157
|
-
}
|
|
24158
|
-
|
|
24159
|
-
/**
|
|
24160
|
-
* Retrieves the full URL as a string.
|
|
24161
|
-
* Can be set to navigate to the given URL.
|
|
24162
|
-
*/
|
|
24163
|
-
static get href() {
|
|
24164
|
-
return WindowLocation.getInstance().href;
|
|
24165
|
-
}
|
|
24166
|
-
static set href(value) {
|
|
24167
|
-
WindowLocation.getInstance().href = value;
|
|
24168
|
-
}
|
|
24169
|
-
|
|
24170
|
-
/**
|
|
24171
|
-
* Retrieves the origin of the current URL, which is the scheme, domain, and port.
|
|
24172
|
-
*/
|
|
24173
|
-
static get origin() {
|
|
24174
|
-
return WindowLocation.getInstance().origin;
|
|
24175
|
-
}
|
|
24176
|
-
|
|
24177
|
-
/**
|
|
24178
|
-
* Retrieves the path of the current URL.
|
|
24179
|
-
* Can be set to navigate to the same URL with a different path.
|
|
24180
|
-
*/
|
|
24181
|
-
static get pathname() {
|
|
24182
|
-
return WindowLocation.getInstance().pathname;
|
|
24183
|
-
}
|
|
24184
|
-
static set pathname(value) {
|
|
24185
|
-
WindowLocation.getInstance().pathname = value;
|
|
24186
|
-
}
|
|
24187
|
-
|
|
24188
|
-
/**
|
|
24189
|
-
* Retrieves the port number of the current URL.
|
|
24190
|
-
* Can be set to navigate to the same URL with a different port.
|
|
24191
|
-
*/
|
|
24192
|
-
static get port() {
|
|
24193
|
-
return WindowLocation.getInstance().port;
|
|
24194
|
-
}
|
|
24195
|
-
static set port(value) {
|
|
24196
|
-
WindowLocation.getInstance().port = value;
|
|
24197
|
-
}
|
|
24198
|
-
|
|
24199
|
-
/**
|
|
24200
|
-
* Retrieves the protocol scheme of the current URL (e.g., "http:" or "https:").
|
|
24201
|
-
* Can be set to navigate to the same URL with a different protocol.
|
|
24202
|
-
*/
|
|
24203
|
-
static get protocol() {
|
|
24204
|
-
return WindowLocation.getInstance().protocol;
|
|
24205
|
-
}
|
|
24206
|
-
static set protocol(value) {
|
|
24207
|
-
WindowLocation.getInstance().protocol = value;
|
|
24208
|
-
}
|
|
24209
|
-
|
|
24210
|
-
/**
|
|
24211
|
-
* Retrieves the query string of the current URL.
|
|
24212
|
-
* Can be set to navigate to the same URL with a different query.
|
|
24213
|
-
*/
|
|
24214
|
-
static get search() {
|
|
24215
|
-
return WindowLocation.getInstance().search;
|
|
24216
|
-
}
|
|
24217
|
-
static set search(value) {
|
|
24218
|
-
WindowLocation.getInstance().search = value;
|
|
24219
|
-
}
|
|
24220
|
-
|
|
24221
|
-
/**
|
|
24222
|
-
* Navigates to a new URL.
|
|
24223
|
-
* @param url The URL to navigate to.
|
|
24224
|
-
*/
|
|
24225
|
-
static assign(url) {
|
|
24226
|
-
WindowLocation.getInstance().assign(url);
|
|
24227
|
-
}
|
|
24228
|
-
|
|
24229
|
-
/**
|
|
24230
|
-
* Reloads the current page.
|
|
24231
|
-
*/
|
|
24232
|
-
static reload() {
|
|
24233
|
-
WindowLocation.getInstance().reload();
|
|
24234
|
-
}
|
|
24235
|
-
|
|
24236
|
-
/**
|
|
24237
|
-
* Replaces the current page with the given URL without creating a new entry in the session history.
|
|
24238
|
-
* @param url The URL to navigate to.
|
|
24239
|
-
*/
|
|
24240
|
-
static replace(url) {
|
|
24241
|
-
WindowLocation.getInstance().replace(url);
|
|
24242
|
-
}
|
|
24243
|
-
|
|
24244
|
-
// Instance methods for custom implementations
|
|
24245
|
-
|
|
24246
|
-
/**
|
|
24247
|
-
* Retrieves the origins of the ancestor browsing contexts as a DOMStringList.
|
|
24248
|
-
*/
|
|
24249
|
-
get ancestorOrigins() {
|
|
24250
|
-
return this.nativeInstance.ancestorOrigins;
|
|
24251
|
-
}
|
|
24252
|
-
|
|
24253
|
-
/**
|
|
24254
|
-
* Retrieves the fragment identifier (hash) of the current URL.
|
|
24255
|
-
* Can be set to navigate to the same URL with a different fragment.
|
|
24256
|
-
*/
|
|
24257
|
-
get hash() {
|
|
24258
|
-
return this.nativeInstance.hash;
|
|
24259
|
-
}
|
|
24260
|
-
set hash(value) {
|
|
24261
|
-
this.nativeInstance.hash = value;
|
|
24262
|
-
}
|
|
24263
|
-
|
|
24264
|
-
/**
|
|
24265
|
-
* Retrieves the host (hostname and port) of the current URL.
|
|
24266
|
-
* Can be set to navigate to the same URL with a different host and port.
|
|
24267
|
-
*/
|
|
24268
|
-
get host() {
|
|
24269
|
-
return this.nativeInstance.host;
|
|
24270
|
-
}
|
|
24271
|
-
set host(value) {
|
|
24272
|
-
this.nativeInstance.host = value;
|
|
24273
|
-
}
|
|
24274
|
-
|
|
24275
|
-
/**
|
|
24276
|
-
* Retrieves the hostname of the current URL.
|
|
24277
|
-
* Can be set to navigate to the same URL with a different hostname.
|
|
24278
|
-
*/
|
|
24279
|
-
get hostname() {
|
|
24280
|
-
return this.nativeInstance.hostname;
|
|
24281
|
-
}
|
|
24282
|
-
set hostname(value) {
|
|
24283
|
-
this.nativeInstance.hostname = value;
|
|
24284
|
-
}
|
|
24285
|
-
|
|
24286
|
-
/**
|
|
24287
|
-
* Retrieves the full URL as a string.
|
|
24288
|
-
* Can be set to navigate to the given URL.
|
|
24289
|
-
*/
|
|
24290
|
-
get href() {
|
|
24291
|
-
return this.nativeInstance.href;
|
|
24292
|
-
}
|
|
24293
|
-
set href(value) {
|
|
24294
|
-
this.nativeInstance.href = value;
|
|
24295
|
-
}
|
|
24296
|
-
|
|
24297
|
-
/**
|
|
24298
|
-
* Retrieves the origin of the current URL, which is the scheme, domain, and port.
|
|
24299
|
-
*/
|
|
24300
|
-
get origin() {
|
|
24301
|
-
return this.nativeInstance.origin;
|
|
24302
|
-
}
|
|
24303
|
-
|
|
24304
|
-
/**
|
|
24305
|
-
* Retrieves the path of the current URL.
|
|
24306
|
-
* Can be set to navigate to the same URL with a different path.
|
|
24307
|
-
*/
|
|
24308
|
-
get pathname() {
|
|
24309
|
-
return this.nativeInstance.pathname;
|
|
24310
|
-
}
|
|
24311
|
-
set pathname(value) {
|
|
24312
|
-
this.nativeInstance.pathname = value;
|
|
24313
|
-
}
|
|
24314
|
-
|
|
24315
|
-
/**
|
|
24316
|
-
* Retrieves the port number of the current URL.
|
|
24317
|
-
* Can be set to navigate to the same URL with a different port.
|
|
24318
|
-
*/
|
|
24319
|
-
get port() {
|
|
24320
|
-
return this.nativeInstance.port;
|
|
24321
|
-
}
|
|
24322
|
-
set port(value) {
|
|
24323
|
-
this.nativeInstance.port = value;
|
|
24324
|
-
}
|
|
24325
|
-
|
|
24326
|
-
/**
|
|
24327
|
-
* Retrieves the protocol scheme of the current URL (e.g., "http:" or "https:").
|
|
24328
|
-
* Can be set to navigate to the same URL with a different protocol.
|
|
24329
|
-
*/
|
|
24330
|
-
get protocol() {
|
|
24331
|
-
return this.nativeInstance.protocol;
|
|
24332
|
-
}
|
|
24333
|
-
set protocol(value) {
|
|
24334
|
-
this.nativeInstance.protocol = value;
|
|
24335
|
-
}
|
|
24336
|
-
|
|
24337
|
-
/**
|
|
24338
|
-
* Retrieves the query string of the current URL.
|
|
24339
|
-
* Can be set to navigate to the same URL with a different query.
|
|
24340
|
-
*/
|
|
24341
|
-
get search() {
|
|
24342
|
-
return this.nativeInstance.search;
|
|
24343
|
-
}
|
|
24344
|
-
set search(value) {
|
|
24345
|
-
this.nativeInstance.search = value;
|
|
24346
|
-
}
|
|
24347
|
-
|
|
24348
|
-
/**
|
|
24349
|
-
* Navigates to a new URL.
|
|
24350
|
-
* @param url The URL to navigate to.
|
|
24351
|
-
*/
|
|
24352
|
-
assign(url) {
|
|
24353
|
-
this.nativeInstance.assign(url);
|
|
24354
|
-
}
|
|
24355
|
-
|
|
24356
|
-
/**
|
|
24357
|
-
* Reloads the current page.
|
|
24358
|
-
*/
|
|
24359
|
-
reload() {
|
|
24360
|
-
this.nativeInstance.reload();
|
|
24361
|
-
}
|
|
24362
|
-
|
|
24363
|
-
/**
|
|
24364
|
-
* Replaces the current page with the given URL without creating a new entry in the session history.
|
|
24365
|
-
* @param url The URL to navigate to.
|
|
24366
|
-
*/
|
|
24367
|
-
replace(url) {
|
|
24368
|
-
this.nativeInstance.replace(url);
|
|
24369
|
-
}
|
|
24370
|
-
}
|
|
24371
|
-
WindowLocation.instance = void 0;
|
|
24372
|
-
|
|
24373
|
-
/***/ }),
|
|
24374
|
-
|
|
24375
23855
|
/***/ "../../dist/@frontegg/redux-store/toolkit/index.js":
|
|
24376
23856
|
/*!*********************************************************!*\
|
|
24377
23857
|
!*** ../../dist/@frontegg/redux-store/toolkit/index.js ***!
|
|
@@ -24394,7 +23874,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
24394
23874
|
/* harmony export */ GroupRelations: () => (/* reexport safe */ _store__WEBPACK_IMPORTED_MODULE_1__.GroupRelations),
|
|
24395
23875
|
/* harmony export */ GroupsStateKeys: () => (/* reexport safe */ _store__WEBPACK_IMPORTED_MODULE_1__.GroupsStateKeys),
|
|
24396
23876
|
/* harmony export */ ImpersonateStep: () => (/* reexport safe */ _store__WEBPACK_IMPORTED_MODULE_1__.ImpersonateStep),
|
|
24397
|
-
/* harmony export */ LocalStorage: () => (/* reexport safe */ _LocalStorage__WEBPACK_IMPORTED_MODULE_4__.LocalStorage),
|
|
24398
23877
|
/* harmony export */ LoginActionTypes: () => (/* reexport safe */ _store__WEBPACK_IMPORTED_MODULE_1__.LoginActionTypes),
|
|
24399
23878
|
/* harmony export */ LoginFlow: () => (/* reexport safe */ _store__WEBPACK_IMPORTED_MODULE_1__.LoginFlow),
|
|
24400
23879
|
/* harmony export */ LoginStep: () => (/* reexport safe */ _store__WEBPACK_IMPORTED_MODULE_1__.LoginStep),
|
|
@@ -24406,11 +23885,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
24406
23885
|
/* harmony export */ SSOStateKeys: () => (/* reexport safe */ _store__WEBPACK_IMPORTED_MODULE_1__.SSOStateKeys),
|
|
24407
23886
|
/* harmony export */ SamlVendors: () => (/* reexport safe */ _store__WEBPACK_IMPORTED_MODULE_1__.SamlVendors),
|
|
24408
23887
|
/* harmony export */ SecurityCenterStateKeys: () => (/* reexport safe */ _store__WEBPACK_IMPORTED_MODULE_1__.SecurityCenterStateKeys),
|
|
24409
|
-
/* harmony export */ SessionStorage: () => (/* reexport safe */ _SessionStorage__WEBPACK_IMPORTED_MODULE_5__.SessionStorage),
|
|
24410
23888
|
/* harmony export */ SignUpStage: () => (/* reexport safe */ _store__WEBPACK_IMPORTED_MODULE_1__.SignUpStage),
|
|
24411
23889
|
/* harmony export */ TeamStateKeys: () => (/* reexport safe */ _store__WEBPACK_IMPORTED_MODULE_1__.TeamStateKeys),
|
|
24412
23890
|
/* harmony export */ UserVeirifedOriginTypes: () => (/* reexport safe */ _store__WEBPACK_IMPORTED_MODULE_1__.UserVeirifedOriginTypes),
|
|
24413
|
-
/* harmony export */ WindowLocation: () => (/* reexport safe */ _WindowLocation__WEBPACK_IMPORTED_MODULE_6__.WindowLocation),
|
|
24414
23891
|
/* harmony export */ buildAuthActions: () => (/* reexport safe */ _store__WEBPACK_IMPORTED_MODULE_1__.buildAuthActions),
|
|
24415
23892
|
/* harmony export */ createAuthState: () => (/* reexport safe */ _store__WEBPACK_IMPORTED_MODULE_1__.createAuthState),
|
|
24416
23893
|
/* harmony export */ createFronteggStore: () => (/* reexport safe */ _store__WEBPACK_IMPORTED_MODULE_1__.createFronteggStore),
|
|
@@ -24427,12 +23904,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
24427
23904
|
/* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./store */ "../../dist/@frontegg/redux-store/toolkit/store.js");
|
|
24428
23905
|
/* harmony import */ var _valtio__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../valtio */ "../../dist/@frontegg/redux-store/valtio/valtio.js");
|
|
24429
23906
|
/* harmony import */ var _proxy__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./proxy */ "../../dist/@frontegg/redux-store/toolkit/proxy.js");
|
|
24430
|
-
/* harmony import */ var _LocalStorage__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./LocalStorage */ "../../dist/@frontegg/redux-store/toolkit/LocalStorage.js");
|
|
24431
|
-
/* harmony import */ var _SessionStorage__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./SessionStorage */ "../../dist/@frontegg/redux-store/toolkit/SessionStorage.js");
|
|
24432
|
-
/* harmony import */ var _WindowLocation__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./WindowLocation */ "../../dist/@frontegg/redux-store/toolkit/WindowLocation.js");
|
|
24433
|
-
|
|
24434
|
-
|
|
24435
|
-
|
|
24436
23907
|
|
|
24437
23908
|
|
|
24438
23909
|
|
|
@@ -24628,7 +24099,7 @@ const createStore = options => {
|
|
|
24628
24099
|
auditLogs: auditsState,
|
|
24629
24100
|
audits: oldAuditsState
|
|
24630
24101
|
});
|
|
24631
|
-
if (typeof window !== 'undefined' && (
|
|
24102
|
+
if (typeof window !== 'undefined' && (localStorage['DEBUG_FRONTEGG_STORE'] === 'true' || "development" === 'development')) {
|
|
24632
24103
|
(0,_valtio__WEBPACK_IMPORTED_MODULE_10__.devtools)(store, {
|
|
24633
24104
|
name: `${appName} Store`,
|
|
24634
24105
|
enabled: true
|
|
@@ -24678,6 +24149,7 @@ const createStore = options => {
|
|
|
24678
24149
|
},
|
|
24679
24150
|
getState: () => store,
|
|
24680
24151
|
subscribe: callback => (0,_valtio__WEBPACK_IMPORTED_MODULE_14__.subscribe)(store, callback),
|
|
24152
|
+
subscribeStateChanged: callback => (0,_valtio__WEBPACK_IMPORTED_MODULE_14__.subscribe)(store, () => callback(store)),
|
|
24681
24153
|
store,
|
|
24682
24154
|
actions,
|
|
24683
24155
|
stateActions
|
|
@@ -24722,6 +24194,7 @@ const createStore = options => {
|
|
|
24722
24194
|
},
|
|
24723
24195
|
getState: () => store,
|
|
24724
24196
|
subscribe: callback => (0,_valtio__WEBPACK_IMPORTED_MODULE_14__.subscribe)(store, callback),
|
|
24197
|
+
subscribeStateChanged: callback => (0,_valtio__WEBPACK_IMPORTED_MODULE_14__.subscribe)(store, () => callback(store)),
|
|
24725
24198
|
store,
|
|
24726
24199
|
actions,
|
|
24727
24200
|
stateActions
|
|
@@ -24779,7 +24252,7 @@ function devtools(proxyObject, options) {
|
|
|
24779
24252
|
let extension;
|
|
24780
24253
|
try {
|
|
24781
24254
|
// @ts-ignore
|
|
24782
|
-
extension = enabled &&
|
|
24255
|
+
extension = enabled && window.__REDUX_DEVTOOLS_EXTENSION__;
|
|
24783
24256
|
} catch {
|
|
24784
24257
|
// ignored
|
|
24785
24258
|
}
|
|
@@ -25939,7 +25412,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
25939
25412
|
/* harmony export */ });
|
|
25940
25413
|
/* harmony import */ var _ThemeOptions__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ThemeOptions */ "../../dist/@frontegg/types/ThemeOptions/index.js");
|
|
25941
25414
|
/* harmony import */ var _Metadata__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Metadata */ "../../dist/@frontegg/types/Metadata/index.js");
|
|
25942
|
-
/** @license Frontegg v7.
|
|
25415
|
+
/** @license Frontegg v7.12.0
|
|
25943
25416
|
*
|
|
25944
25417
|
* This source code is licensed under the MIT license found in the
|
|
25945
25418
|
* LICENSE file in the root directory of this source tree.
|
|
@@ -34567,18 +34040,6 @@ const replaceNewProxy = (fn) => {
|
|
|
34567
34040
|
/******/ };
|
|
34568
34041
|
/******/ })();
|
|
34569
34042
|
/******/
|
|
34570
|
-
/******/ /* webpack/runtime/global */
|
|
34571
|
-
/******/ (() => {
|
|
34572
|
-
/******/ __webpack_require__.g = (function() {
|
|
34573
|
-
/******/ if (typeof globalThis === 'object') return globalThis;
|
|
34574
|
-
/******/ try {
|
|
34575
|
-
/******/ return this || new Function('return this')();
|
|
34576
|
-
/******/ } catch (e) {
|
|
34577
|
-
/******/ if (typeof window === 'object') return window;
|
|
34578
|
-
/******/ }
|
|
34579
|
-
/******/ })();
|
|
34580
|
-
/******/ })();
|
|
34581
|
-
/******/
|
|
34582
34043
|
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
|
34583
34044
|
/******/ (() => {
|
|
34584
34045
|
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
|