@frontegg/js 7.10.0-alpha.0 → 7.10.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 +212 -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.10.0
|
|
1589
|
+
cdnVersion: '7.10.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
|
-
store.auth.loginState = (0,
|
|
5417
|
+
store.auth.loginState = (0,_helpers__WEBPACK_IMPORTED_MODULE_6__.deepClone)(_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
|
/***/ }),
|
|
@@ -6490,8 +6481,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
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 _helpers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../helpers */ "../../dist/@frontegg/redux-store/helpers/common.js");
|
|
6492
6483
|
/* harmony import */ var _MfaState_state__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../MfaState/state */ "../../dist/@frontegg/redux-store/auth/MfaState/state.js");
|
|
6493
|
-
/* harmony import */ var _toolkit__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../toolkit */ "../../dist/@frontegg/redux-store/toolkit/LocalStorage.js");
|
|
6494
|
-
|
|
6495
6484
|
|
|
6496
6485
|
|
|
6497
6486
|
|
|
@@ -6525,7 +6514,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
6525
6514
|
step = _interfaces__WEBPACK_IMPORTED_MODULE_1__.LoginStep.forceTwoFactor;
|
|
6526
6515
|
}
|
|
6527
6516
|
let quickLoginState = {};
|
|
6528
|
-
const quickLoginToRegister =
|
|
6517
|
+
const quickLoginToRegister = localStorage.getItem('register-quick-login');
|
|
6529
6518
|
if (quickLoginToRegister) {
|
|
6530
6519
|
quickLoginState = {
|
|
6531
6520
|
quickLoginToRegister,
|
|
@@ -6572,14 +6561,12 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
6572
6561
|
/* 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");
|
|
6573
6562
|
/* 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");
|
|
6574
6563
|
/* harmony import */ var _interfaces__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../interfaces */ "../../dist/@frontegg/redux-store/auth/LoginState/interfaces.js");
|
|
6575
|
-
/* harmony import */ var
|
|
6576
|
-
/* harmony import */ var _toolkit__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../toolkit */ "../../dist/@frontegg/redux-store/toolkit/LocalStorage.js");
|
|
6564
|
+
/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../helpers */ "../../dist/@frontegg/redux-store/helpers/handlers.js");
|
|
6577
6565
|
|
|
6578
6566
|
|
|
6579
6567
|
const _excluded = ["callback"];
|
|
6580
6568
|
|
|
6581
6569
|
|
|
6582
|
-
|
|
6583
6570
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ((store, api, sharedActions) => {
|
|
6584
6571
|
const actions = sharedActions;
|
|
6585
6572
|
|
|
@@ -6677,7 +6664,7 @@ const _excluded = ["callback"];
|
|
|
6677
6664
|
activeTenant
|
|
6678
6665
|
}, additionalUpdate);
|
|
6679
6666
|
if (user.id) {
|
|
6680
|
-
|
|
6667
|
+
localStorage.setItem('userId', user.id);
|
|
6681
6668
|
}
|
|
6682
6669
|
setLoadingAction({
|
|
6683
6670
|
loading: false,
|
|
@@ -6690,7 +6677,7 @@ const _excluded = ["callback"];
|
|
|
6690
6677
|
} catch (e) {
|
|
6691
6678
|
setLoadingAction({
|
|
6692
6679
|
loading: false,
|
|
6693
|
-
error: (0,
|
|
6680
|
+
error: (0,_helpers__WEBPACK_IMPORTED_MODULE_3__.errorHandler)(e)
|
|
6694
6681
|
});
|
|
6695
6682
|
callback == null ? void 0 : callback(false, e);
|
|
6696
6683
|
}
|
|
@@ -7170,11 +7157,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
7170
7157
|
/* harmony export */ isEmailPayload: () => (/* binding */ isEmailPayload),
|
|
7171
7158
|
/* harmony export */ isOauthCallbackRoute: () => (/* binding */ isOauthCallbackRoute)
|
|
7172
7159
|
/* harmony export */ });
|
|
7173
|
-
/* harmony import */ var
|
|
7174
|
-
/* harmony import */ var
|
|
7175
|
-
/* harmony import */ var
|
|
7176
|
-
/* harmony import */ var _toolkit__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../toolkit */ "../../dist/@frontegg/redux-store/toolkit/WindowLocation.js");
|
|
7177
|
-
|
|
7160
|
+
/* harmony import */ var _frontegg_rest_api__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @frontegg/rest-api */ "../../node_modules/@frontegg/rest-api/auth/interfaces.js");
|
|
7161
|
+
/* harmony import */ var _frontegg_rest_api__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @frontegg/rest-api */ "../../node_modules/@frontegg/rest-api/ContextHolder/index.js");
|
|
7162
|
+
/* harmony import */ var _MfaState_interfaces__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../MfaState/interfaces */ "../../dist/@frontegg/redux-store/auth/MfaState/interfaces.js");
|
|
7178
7163
|
|
|
7179
7164
|
|
|
7180
7165
|
const isAbsoluteUrl = path => {
|
|
@@ -7186,7 +7171,7 @@ const isAbsoluteUrl = path => {
|
|
|
7186
7171
|
}
|
|
7187
7172
|
};
|
|
7188
7173
|
const isValidRedirectUrl = (redirectUrl, allowedRedirectOrigins) => {
|
|
7189
|
-
const currentUrl = new URL(
|
|
7174
|
+
const currentUrl = new URL(window.location.href);
|
|
7190
7175
|
const redirectURL = new URL(redirectUrl);
|
|
7191
7176
|
const isSameSite = redirectURL.origin === currentUrl.origin;
|
|
7192
7177
|
const isOriginInWhiteList = allowedRedirectOrigins.includes(redirectURL.origin);
|
|
@@ -7198,7 +7183,7 @@ const getRedirectUrl = ({
|
|
|
7198
7183
|
allowedRedirectOrigins,
|
|
7199
7184
|
includeQueryParam
|
|
7200
7185
|
}) => {
|
|
7201
|
-
const currentUrl = new URL(
|
|
7186
|
+
const currentUrl = new URL(window.location.href);
|
|
7202
7187
|
let redirectUrl = authenticatedUrl;
|
|
7203
7188
|
const redirectUrlQueryParam = currentUrl.searchParams.get('redirectUrl');
|
|
7204
7189
|
if (redirectUrlQueryParam) {
|
|
@@ -7212,7 +7197,7 @@ const getRedirectUrl = ({
|
|
|
7212
7197
|
}
|
|
7213
7198
|
}
|
|
7214
7199
|
} else if (includeQueryParam) {
|
|
7215
|
-
redirectUrl +=
|
|
7200
|
+
redirectUrl += window.location.search;
|
|
7216
7201
|
}
|
|
7217
7202
|
return redirectUrl;
|
|
7218
7203
|
};
|
|
@@ -7243,7 +7228,7 @@ const getPathAndSearchParamsFromUrl = url => {
|
|
|
7243
7228
|
* @returns the value of the param as string or undefined if it does not exist
|
|
7244
7229
|
*/
|
|
7245
7230
|
const getSearchParam = key => {
|
|
7246
|
-
const params = new URLSearchParams(
|
|
7231
|
+
const params = new URLSearchParams(window.location.search);
|
|
7247
7232
|
const param = params.get(key);
|
|
7248
7233
|
return param != null ? param : undefined;
|
|
7249
7234
|
};
|
|
@@ -7271,27 +7256,27 @@ const getMfaStepForEnrolledUsers = mfaDevices => {
|
|
|
7271
7256
|
} = getNumberOfMfaDevices(mfaDevices);
|
|
7272
7257
|
if (totalDevices === 1) {
|
|
7273
7258
|
if (numberOfAuthenticators) {
|
|
7274
|
-
return
|
|
7259
|
+
return _MfaState_interfaces__WEBPACK_IMPORTED_MODULE_0__.MFAStep.authenticatorApp;
|
|
7275
7260
|
} else if (numberOfPhoneDevices) {
|
|
7276
|
-
return
|
|
7261
|
+
return _MfaState_interfaces__WEBPACK_IMPORTED_MODULE_0__.MFAStep.smsVerifyCode;
|
|
7277
7262
|
} else if (numberOfEmails) {
|
|
7278
|
-
return
|
|
7263
|
+
return _MfaState_interfaces__WEBPACK_IMPORTED_MODULE_0__.MFAStep.emailVerifyCode;
|
|
7279
7264
|
}
|
|
7280
7265
|
}
|
|
7281
|
-
return
|
|
7266
|
+
return _MfaState_interfaces__WEBPACK_IMPORTED_MODULE_0__.MFAStep.verify;
|
|
7282
7267
|
};
|
|
7283
7268
|
const getMfaStepForNotEnrolledUsers = mfaStrategies => {
|
|
7284
7269
|
if (mfaStrategies.length === 1) {
|
|
7285
7270
|
const [strategy] = mfaStrategies;
|
|
7286
|
-
if (strategy ===
|
|
7287
|
-
return
|
|
7288
|
-
} else if (strategy ===
|
|
7289
|
-
return
|
|
7290
|
-
} else if (strategy ===
|
|
7291
|
-
return
|
|
7271
|
+
if (strategy === _frontegg_rest_api__WEBPACK_IMPORTED_MODULE_1__.MFAStrategyEnum.AuthenticatorApp) {
|
|
7272
|
+
return _MfaState_interfaces__WEBPACK_IMPORTED_MODULE_0__.MFAStep.authenticatorApp;
|
|
7273
|
+
} else if (strategy === _frontegg_rest_api__WEBPACK_IMPORTED_MODULE_1__.MFAStrategyEnum.SMS) {
|
|
7274
|
+
return _MfaState_interfaces__WEBPACK_IMPORTED_MODULE_0__.MFAStep.smsSetPhoneNumber;
|
|
7275
|
+
} else if (strategy === _frontegg_rest_api__WEBPACK_IMPORTED_MODULE_1__.MFAStrategyEnum.EmailCode) {
|
|
7276
|
+
return _MfaState_interfaces__WEBPACK_IMPORTED_MODULE_0__.MFAStep.emailVerifyCode;
|
|
7292
7277
|
}
|
|
7293
7278
|
}
|
|
7294
|
-
return
|
|
7279
|
+
return _MfaState_interfaces__WEBPACK_IMPORTED_MODULE_0__.MFAStep.verify;
|
|
7295
7280
|
};
|
|
7296
7281
|
const isOauthCallbackRoute = activeUri => {
|
|
7297
7282
|
return activeUri === '/oauth/callback';
|
|
@@ -7300,7 +7285,7 @@ function isEmailPayload(payload) {
|
|
|
7300
7285
|
return 'email' in payload;
|
|
7301
7286
|
}
|
|
7302
7287
|
const getBaseNameWithoutSlashSuffix = state => {
|
|
7303
|
-
const basename =
|
|
7288
|
+
const basename = _frontegg_rest_api__WEBPACK_IMPORTED_MODULE_2__.ContextHolder.for(state.root.appName).getBasename();
|
|
7304
7289
|
if (basename != null && basename.endsWith('/')) {
|
|
7305
7290
|
return basename.slice(0, -1);
|
|
7306
7291
|
}
|
|
@@ -9420,8 +9405,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
9420
9405
|
/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../helpers */ "../../dist/@frontegg/redux-store/helpers/handlers.js");
|
|
9421
9406
|
/* harmony import */ var _state__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./state */ "../../dist/@frontegg/redux-store/auth/PasskeysState/state.js");
|
|
9422
9407
|
/* harmony import */ var _frontegg_rest_api__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @frontegg/rest-api */ "../../node_modules/@frontegg/rest-api/auth/interfaces.js");
|
|
9423
|
-
/* harmony import */ var _toolkit__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../toolkit */ "../../dist/@frontegg/redux-store/toolkit/LocalStorage.js");
|
|
9424
|
-
|
|
9425
9408
|
|
|
9426
9409
|
|
|
9427
9410
|
|
|
@@ -9500,8 +9483,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
9500
9483
|
policy
|
|
9501
9484
|
} = publicAuthStrategyPolicy;
|
|
9502
9485
|
const isPasskeysEnabledByVendor = await getPasskeysVendorPolicy(policy);
|
|
9503
|
-
const isLoggedInWithPasskeys =
|
|
9504
|
-
const isMarkedDontShowAgainPrompt =
|
|
9486
|
+
const isLoggedInWithPasskeys = localStorage.getItem('preferred-login-method') === 'Passkeys';
|
|
9487
|
+
const isMarkedDontShowAgainPrompt = localStorage.getItem('dont-show-again-prompt-passkeys') === 'true';
|
|
9505
9488
|
const [showPasskeys] = await actions.getFeatureFlags(['show-passkeys-new']);
|
|
9506
9489
|
if (!showPasskeys || !isPasskeysEnabledByVendor || isLoggedInWithPasskeys || isMarkedDontShowAgainPrompt) {
|
|
9507
9490
|
return false;
|
|
@@ -13362,7 +13345,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
13362
13345
|
/* harmony import */ var _state__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./state */ "../../dist/@frontegg/redux-store/auth/SocialLoginState/state.js");
|
|
13363
13346
|
/* harmony import */ var _interfaces__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../interfaces */ "../../dist/@frontegg/redux-store/auth/interfaces.js");
|
|
13364
13347
|
/* harmony import */ var _helpers_gtm__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../helpers/gtm */ "../../dist/@frontegg/redux-store/helpers/gtm.js");
|
|
13365
|
-
/* harmony import */ var _toolkit__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../toolkit */ "../../dist/@frontegg/redux-store/toolkit/LocalStorage.js");
|
|
13366
13348
|
|
|
13367
13349
|
|
|
13368
13350
|
const _excluded = ["authorizationUrl"],
|
|
@@ -13371,7 +13353,6 @@ const _excluded = ["authorizationUrl"],
|
|
|
13371
13353
|
|
|
13372
13354
|
|
|
13373
13355
|
|
|
13374
|
-
|
|
13375
13356
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ((store, api, sharedActions) => {
|
|
13376
13357
|
const actions = sharedActions;
|
|
13377
13358
|
|
|
@@ -13499,14 +13480,14 @@ const _excluded = ["authorizationUrl"],
|
|
|
13499
13480
|
(0,_helpers_gtm__WEBPACK_IMPORTED_MODULE_6__.reportGTMEvent)(_helpers_gtm__WEBPACK_IMPORTED_MODULE_6__.GTMEventAction.USER_VERIFIED, userVerifiedPayload);
|
|
13500
13481
|
}
|
|
13501
13482
|
if (userId) {
|
|
13502
|
-
|
|
13483
|
+
localStorage.setItem('userId', userId);
|
|
13503
13484
|
}
|
|
13504
13485
|
actions.setLoginState({
|
|
13505
13486
|
email,
|
|
13506
13487
|
isNewUser
|
|
13507
13488
|
});
|
|
13508
|
-
|
|
13509
|
-
|
|
13489
|
+
actions.refreshTokenForSocialLogins();
|
|
13490
|
+
localStorage.removeItem('register-quick-login');
|
|
13510
13491
|
setSocialLoginsState({
|
|
13511
13492
|
loading: false
|
|
13512
13493
|
});
|
|
@@ -13564,13 +13545,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
13564
13545
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
13565
13546
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
13566
13547
|
/* harmony export */ });
|
|
13567
|
-
/* harmony import */ var
|
|
13548
|
+
/* harmony import */ var _frontegg_rest_api__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @frontegg/rest-api */ "../../node_modules/@frontegg/rest-api/ContextHolder/index.js");
|
|
13568
13549
|
/* harmony import */ var _LoginState_helpers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../LoginState/helpers */ "../../dist/@frontegg/redux-store/auth/LoginState/helpers.js");
|
|
13569
13550
|
/* harmony import */ var _MfaState_interfaces__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../MfaState/interfaces */ "../../dist/@frontegg/redux-store/auth/MfaState/interfaces.js");
|
|
13570
|
-
/* harmony import */ var
|
|
13571
|
-
/* harmony import */ var _toolkit__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../toolkit */ "../../dist/@frontegg/redux-store/toolkit/LocalStorage.js");
|
|
13572
|
-
|
|
13573
|
-
|
|
13551
|
+
/* harmony import */ var _consts__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../consts */ "../../dist/@frontegg/redux-store/auth/StepUpState/consts.js");
|
|
13574
13552
|
|
|
13575
13553
|
|
|
13576
13554
|
|
|
@@ -13632,9 +13610,9 @@ const isMfaIsNotEnrolledError = error => (error == null ? void 0 : error['messag
|
|
|
13632
13610
|
});
|
|
13633
13611
|
return;
|
|
13634
13612
|
}
|
|
13635
|
-
|
|
13613
|
+
window.localStorage.setItem(_consts__WEBPACK_IMPORTED_MODULE_2__.SHOULD_STEP_UP_KEY, 'true');
|
|
13636
13614
|
const routes = store.auth.routes;
|
|
13637
|
-
|
|
13615
|
+
_frontegg_rest_api__WEBPACK_IMPORTED_MODULE_3__.ContextHolder.for(store.root.appName).onRedirectTo(routes.logoutUrl, {
|
|
13638
13616
|
preserveQueryParams: true
|
|
13639
13617
|
});
|
|
13640
13618
|
};
|
|
@@ -13808,8 +13786,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
13808
13786
|
/* harmony export */ });
|
|
13809
13787
|
/* harmony import */ var _consts__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../consts */ "../../dist/@frontegg/redux-store/auth/StepUpState/consts.js");
|
|
13810
13788
|
/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../helpers */ "../../dist/@frontegg/redux-store/auth/StepUpState/helpers.js");
|
|
13811
|
-
/* harmony import */ var _toolkit__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../toolkit */ "../../dist/@frontegg/redux-store/toolkit/LocalStorage.js");
|
|
13812
|
-
|
|
13813
13789
|
|
|
13814
13790
|
|
|
13815
13791
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ((store, api, sharedActions) => {
|
|
@@ -13834,8 +13810,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
13834
13810
|
if (alias) {
|
|
13835
13811
|
params['organization'] = alias;
|
|
13836
13812
|
}
|
|
13837
|
-
|
|
13838
|
-
|
|
13813
|
+
(0,_helpers__WEBPACK_IMPORTED_MODULE_1__.setAfterAuthRedirectUrlForStepUp)();
|
|
13814
|
+
window.localStorage.setItem(_consts__WEBPACK_IMPORTED_MODULE_0__.SHOULD_STEP_UP_KEY, 'true');
|
|
13839
13815
|
await actions.__requestHostedLoginAuthorize(params);
|
|
13840
13816
|
};
|
|
13841
13817
|
return {
|
|
@@ -13901,11 +13877,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
13901
13877
|
/* harmony export */ redirectByStepUpUrl: () => (/* binding */ redirectByStepUpUrl),
|
|
13902
13878
|
/* harmony export */ setAfterAuthRedirectUrlForStepUp: () => (/* binding */ setAfterAuthRedirectUrlForStepUp)
|
|
13903
13879
|
/* harmony export */ });
|
|
13904
|
-
/* harmony import */ var
|
|
13880
|
+
/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../constants */ "../../dist/@frontegg/redux-store/constants.js");
|
|
13905
13881
|
/* harmony import */ var _consts__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./consts */ "../../dist/@frontegg/redux-store/auth/StepUpState/consts.js");
|
|
13906
|
-
/* harmony import */ var _toolkit__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../toolkit */ "../../dist/@frontegg/redux-store/toolkit/WindowLocation.js");
|
|
13907
|
-
/* harmony import */ var _toolkit__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../toolkit */ "../../dist/@frontegg/redux-store/toolkit/LocalStorage.js");
|
|
13908
|
-
|
|
13909
13882
|
|
|
13910
13883
|
|
|
13911
13884
|
/**
|
|
@@ -13938,9 +13911,9 @@ const isSteppedUp = (user, {
|
|
|
13938
13911
|
/**
|
|
13939
13912
|
* Set the url and query params in the local storage FRONTEGG_AFTER_AUTH_REDIRECT_URL value
|
|
13940
13913
|
*/
|
|
13941
|
-
|
|
13942
|
-
const encodedRedirectUrl =
|
|
13943
|
-
|
|
13914
|
+
function setAfterAuthRedirectUrlForStepUp() {
|
|
13915
|
+
const encodedRedirectUrl = window.location.pathname + window.location.search;
|
|
13916
|
+
window.localStorage.setItem(_constants__WEBPACK_IMPORTED_MODULE_1__.FRONTEGG_AFTER_AUTH_REDIRECT_URL, encodedRedirectUrl);
|
|
13944
13917
|
}
|
|
13945
13918
|
|
|
13946
13919
|
/**
|
|
@@ -13950,9 +13923,9 @@ async function setAfterAuthRedirectUrlForStepUp() {
|
|
|
13950
13923
|
* @param onRedirectTo - redirect to function
|
|
13951
13924
|
* @param maxAge - max age of step up
|
|
13952
13925
|
*/
|
|
13953
|
-
const redirectByStepUpUrl =
|
|
13954
|
-
|
|
13955
|
-
const searchParams = new URLSearchParams(
|
|
13926
|
+
const redirectByStepUpUrl = (stepUpUrl, onRedirectTo, maxAge) => {
|
|
13927
|
+
setAfterAuthRedirectUrlForStepUp();
|
|
13928
|
+
const searchParams = new URLSearchParams(window.location.search);
|
|
13956
13929
|
if (maxAge) {
|
|
13957
13930
|
searchParams.set(_consts__WEBPACK_IMPORTED_MODULE_0__.STEP_UP_MAX_AGE_PARAM_NAME, maxAge.toString());
|
|
13958
13931
|
}
|
|
@@ -16940,10 +16913,8 @@ let GTMEventAction;
|
|
|
16940
16913
|
* @param payload
|
|
16941
16914
|
*/
|
|
16942
16915
|
function reportGTMEvent(action, payload) {
|
|
16943
|
-
|
|
16944
|
-
|
|
16945
|
-
(_window$onFronteggEve = (_window = window).onFronteggEvent) == null ? void 0 : _window$onFronteggEve.call(_window, action, payload);
|
|
16946
|
-
}
|
|
16916
|
+
var _window$onFronteggEve, _window;
|
|
16917
|
+
(_window$onFronteggEve = (_window = window).onFronteggEvent) == null ? void 0 : _window$onFronteggEve.call(_window, action, payload);
|
|
16947
16918
|
}
|
|
16948
16919
|
|
|
16949
16920
|
/***/ }),
|
|
@@ -17045,8 +17016,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
17045
17016
|
/* harmony export */ generateCodeChallengePureJs: () => (/* binding */ generateCodeChallengePureJs)
|
|
17046
17017
|
/* harmony export */ });
|
|
17047
17018
|
/* harmony import */ var _sha256__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./sha256 */ "../../dist/@frontegg/redux-store/helpers/sha256.js");
|
|
17048
|
-
/* harmony import */ var _toolkit__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../toolkit */ "../../dist/@frontegg/redux-store/toolkit/WindowLocation.js");
|
|
17049
|
-
|
|
17050
17019
|
|
|
17051
17020
|
async function generateCodeChallengePureJs(codeVerifier) {
|
|
17052
17021
|
// noinspection TypeScriptValidateJSTypes pure sha256 recevie single params alg name
|
|
@@ -17063,7 +17032,7 @@ async function generateCodeChallenge(codeVerifier) {
|
|
|
17063
17032
|
if ((_window$crypto = window.crypto) != null && (_window$crypto$subtle = _window$crypto.subtle) != null && _window$crypto$subtle.digest) {
|
|
17064
17033
|
return generateCodeChallengeNative(codeVerifier);
|
|
17065
17034
|
} else {
|
|
17066
|
-
console.warn('Generating CodeChallenge in non-secure domain:',
|
|
17035
|
+
console.warn('Generating CodeChallenge in non-secure domain:', window.location.origin);
|
|
17067
17036
|
return generateCodeChallengePureJs(codeVerifier);
|
|
17068
17037
|
}
|
|
17069
17038
|
}
|
|
@@ -17545,7 +17514,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
17545
17514
|
/* harmony export */ GroupsStateKeys: () => (/* reexport safe */ _toolkit__WEBPACK_IMPORTED_MODULE_0__.GroupsStateKeys),
|
|
17546
17515
|
/* harmony export */ HOSTED_LOGIN_VERIFIER_KEY: () => (/* reexport safe */ _constants__WEBPACK_IMPORTED_MODULE_1__.HOSTED_LOGIN_VERIFIER_KEY),
|
|
17547
17516
|
/* harmony export */ ImpersonateStep: () => (/* reexport safe */ _toolkit__WEBPACK_IMPORTED_MODULE_0__.ImpersonateStep),
|
|
17548
|
-
/* harmony export */ LocalStorage: () => (/* reexport safe */ _toolkit__WEBPACK_IMPORTED_MODULE_0__.LocalStorage),
|
|
17549
17517
|
/* harmony export */ LoginActionTypes: () => (/* reexport safe */ _toolkit__WEBPACK_IMPORTED_MODULE_0__.LoginActionTypes),
|
|
17550
17518
|
/* harmony export */ LoginFlow: () => (/* reexport safe */ _toolkit__WEBPACK_IMPORTED_MODULE_0__.LoginFlow),
|
|
17551
17519
|
/* harmony export */ LoginStep: () => (/* reexport safe */ _toolkit__WEBPACK_IMPORTED_MODULE_0__.LoginStep),
|
|
@@ -17561,14 +17529,12 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
17561
17529
|
/* harmony export */ STEP_UP_MAX_AGE_PARAM_NAME: () => (/* reexport safe */ _constants__WEBPACK_IMPORTED_MODULE_1__.STEP_UP_MAX_AGE_PARAM_NAME),
|
|
17562
17530
|
/* harmony export */ SamlVendors: () => (/* reexport safe */ _toolkit__WEBPACK_IMPORTED_MODULE_0__.SamlVendors),
|
|
17563
17531
|
/* harmony export */ SecurityCenterStateKeys: () => (/* reexport safe */ _toolkit__WEBPACK_IMPORTED_MODULE_0__.SecurityCenterStateKeys),
|
|
17564
|
-
/* harmony export */ SessionStorage: () => (/* reexport safe */ _toolkit__WEBPACK_IMPORTED_MODULE_0__.SessionStorage),
|
|
17565
17532
|
/* harmony export */ SignUpStage: () => (/* reexport safe */ _toolkit__WEBPACK_IMPORTED_MODULE_0__.SignUpStage),
|
|
17566
17533
|
/* harmony export */ SubscriptionCancellationPolicy: () => (/* reexport safe */ _subscriptions_interfaces__WEBPACK_IMPORTED_MODULE_6__.SubscriptionCancellationPolicy),
|
|
17567
17534
|
/* harmony export */ SubscriptionStatus: () => (/* reexport safe */ _subscriptions_interfaces__WEBPACK_IMPORTED_MODULE_6__.SubscriptionStatus),
|
|
17568
17535
|
/* harmony export */ TENANT_ID_PARAM_KEY: () => (/* reexport safe */ _auth_helpers__WEBPACK_IMPORTED_MODULE_3__.TENANT_ID_PARAM_KEY),
|
|
17569
17536
|
/* harmony export */ TeamStateKeys: () => (/* reexport safe */ _toolkit__WEBPACK_IMPORTED_MODULE_0__.TeamStateKeys),
|
|
17570
17537
|
/* harmony export */ UserVeirifedOriginTypes: () => (/* reexport safe */ _toolkit__WEBPACK_IMPORTED_MODULE_0__.UserVeirifedOriginTypes),
|
|
17571
|
-
/* harmony export */ WindowLocation: () => (/* reexport safe */ _toolkit__WEBPACK_IMPORTED_MODULE_0__.WindowLocation),
|
|
17572
17538
|
/* harmony export */ authStrategyLoginStepMap: () => (/* reexport safe */ _constants__WEBPACK_IMPORTED_MODULE_1__.authStrategyLoginStepMap),
|
|
17573
17539
|
/* harmony export */ base64ToFormData: () => (/* reexport safe */ _helpers__WEBPACK_IMPORTED_MODULE_2__.base64ToFormData),
|
|
17574
17540
|
/* harmony export */ base64urlDecode: () => (/* reexport safe */ _helpers__WEBPACK_IMPORTED_MODULE_2__.base64urlDecode),
|
|
@@ -17636,7 +17602,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
17636
17602
|
/* harmony import */ var _subscriptions_interfaces__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./subscriptions/interfaces */ "../../dist/@frontegg/redux-store/subscriptions/interfaces.js");
|
|
17637
17603
|
/* harmony import */ var _vendor__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./vendor */ "../../dist/@frontegg/redux-store/vendor/index.js");
|
|
17638
17604
|
/* harmony import */ var _audits__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./audits */ "../../dist/@frontegg/redux-store/audits/index.js");
|
|
17639
|
-
/** @license Frontegg v7.10.0
|
|
17605
|
+
/** @license Frontegg v7.10.0
|
|
17640
17606
|
*
|
|
17641
17607
|
* This source code is licensed under the MIT license found in the
|
|
17642
17608
|
* LICENSE file in the root directory of this source tree.
|
|
@@ -23794,9 +23760,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
23794
23760
|
class FronteggNativeModule {
|
|
23795
23761
|
constructor() {
|
|
23796
23762
|
this.loginWithSSO = email => {
|
|
23797
|
-
if (typeof window == 'undefined') {
|
|
23798
|
-
throw new Error('FronteggNativeBridge is not available');
|
|
23799
|
-
}
|
|
23800
23763
|
if (this.isWebkitAvailable()) {
|
|
23801
23764
|
var _window$webkit, _window$webkit$messag, _window$webkit$messag2;
|
|
23802
23765
|
(_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({
|
|
@@ -23811,9 +23774,6 @@ class FronteggNativeModule {
|
|
|
23811
23774
|
}
|
|
23812
23775
|
};
|
|
23813
23776
|
this.loginWithSocialLogin = url => {
|
|
23814
|
-
if (typeof window == 'undefined') {
|
|
23815
|
-
throw new Error('FronteggNativeBridge is not available');
|
|
23816
|
-
}
|
|
23817
23777
|
if (this.isWebkitAvailable()) {
|
|
23818
23778
|
var _window$webkit2, _window$webkit2$messa, _window$webkit2$messa2;
|
|
23819
23779
|
(_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({
|
|
@@ -23829,15 +23789,15 @@ class FronteggNativeModule {
|
|
|
23829
23789
|
};
|
|
23830
23790
|
this.promptSocialLoginConsent = () => {
|
|
23831
23791
|
var _window$FronteggNativ3, _window$FronteggNativ4;
|
|
23832
|
-
return
|
|
23792
|
+
return (_window$FronteggNativ3 = (_window$FronteggNativ4 = window.FronteggNativeBridgeFunctions) == null ? void 0 : _window$FronteggNativ4['shouldPromptSocialLoginConsent']) != null ? _window$FronteggNativ3 : false;
|
|
23833
23793
|
};
|
|
23834
23794
|
}
|
|
23835
23795
|
isWebkitAvailable() {
|
|
23836
23796
|
var _window$webkit3, _window$webkit3$messa;
|
|
23837
|
-
return
|
|
23797
|
+
return ((_window$webkit3 = window.webkit) == null ? void 0 : (_window$webkit3$messa = _window$webkit3.messageHandlers) == null ? void 0 : _window$webkit3$messa.FronteggNativeBridge) != null;
|
|
23838
23798
|
}
|
|
23839
23799
|
isJsInterfaceAvailable() {
|
|
23840
|
-
return
|
|
23800
|
+
return window.FronteggNativeBridge != null;
|
|
23841
23801
|
}
|
|
23842
23802
|
isSocialLoginAvailable() {
|
|
23843
23803
|
return this.isAvailable('loginWithSocialLogin');
|
|
@@ -23846,7 +23806,7 @@ class FronteggNativeModule {
|
|
|
23846
23806
|
return this.isAvailable('loginWithSSO');
|
|
23847
23807
|
}
|
|
23848
23808
|
isAvailable(method) {
|
|
23849
|
-
if (
|
|
23809
|
+
if (this.isWebkitAvailable() || this.isJsInterfaceAvailable()) {
|
|
23850
23810
|
var _window$FronteggNativ5, _window$FronteggNativ6;
|
|
23851
23811
|
return (_window$FronteggNativ5 = (_window$FronteggNativ6 = window.FronteggNativeBridgeFunctions) == null ? void 0 : _window$FronteggNativ6[method]) != null ? _window$FronteggNativ5 : false;
|
|
23852
23812
|
}
|
|
@@ -23857,486 +23817,6 @@ class FronteggNativeModule {
|
|
|
23857
23817
|
|
|
23858
23818
|
/***/ }),
|
|
23859
23819
|
|
|
23860
|
-
/***/ "../../dist/@frontegg/redux-store/toolkit/LocalStorage.js":
|
|
23861
|
-
/*!****************************************************************!*\
|
|
23862
|
-
!*** ../../dist/@frontegg/redux-store/toolkit/LocalStorage.js ***!
|
|
23863
|
-
\****************************************************************/
|
|
23864
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
23865
|
-
|
|
23866
|
-
"use strict";
|
|
23867
|
-
__webpack_require__.r(__webpack_exports__);
|
|
23868
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
23869
|
-
/* harmony export */ LocalStorage: () => (/* binding */ LocalStorage)
|
|
23870
|
-
/* harmony export */ });
|
|
23871
|
-
/**
|
|
23872
|
-
* LocalStorage is a singleton instance proxy that is responsible for managing the local storage of the application.
|
|
23873
|
-
* It can be overridden by a framework or application to provide a custom implementation for mobile or server-side rendering.
|
|
23874
|
-
*/
|
|
23875
|
-
class LocalStorage {
|
|
23876
|
-
constructor() {
|
|
23877
|
-
this.nativeInstance = typeof window !== 'undefined' ? window.localStorage : typeof __webpack_require__.g !== 'undefined' ? __webpack_require__.g.localStorage : null;
|
|
23878
|
-
this.getItem = async key => {
|
|
23879
|
-
return Promise.resolve(this.nativeInstance.getItem(key));
|
|
23880
|
-
};
|
|
23881
|
-
this.setItem = async (key, value) => {
|
|
23882
|
-
return Promise.resolve(this.nativeInstance.setItem(key, value));
|
|
23883
|
-
};
|
|
23884
|
-
this.removeItem = async key => {
|
|
23885
|
-
return Promise.resolve(this.nativeInstance.removeItem(key));
|
|
23886
|
-
};
|
|
23887
|
-
this.clear = async () => {
|
|
23888
|
-
return Promise.resolve(this.nativeInstance.clear());
|
|
23889
|
-
};
|
|
23890
|
-
}
|
|
23891
|
-
/**
|
|
23892
|
-
* Retrieves the singleton instance of LocalStorage.
|
|
23893
|
-
* If an instance has been overridden, it returns the overridden instance.
|
|
23894
|
-
* Otherwise, it creates and returns a default instance.
|
|
23895
|
-
*/
|
|
23896
|
-
static getInstance() {
|
|
23897
|
-
if (!LocalStorage.instance) {
|
|
23898
|
-
LocalStorage.instance = new LocalStorage();
|
|
23899
|
-
}
|
|
23900
|
-
return LocalStorage.instance;
|
|
23901
|
-
}
|
|
23902
|
-
|
|
23903
|
-
/**
|
|
23904
|
-
* Overrides the current LocalStorage instance with a custom implementation.
|
|
23905
|
-
* This can be used to provide a different storage mechanism for mobile or server-side environments.
|
|
23906
|
-
* @param customInstance The custom implementation of LocalStorage.
|
|
23907
|
-
*/
|
|
23908
|
-
static overrideInstance(customInstance) {
|
|
23909
|
-
LocalStorage.instance.nativeInstance = customInstance;
|
|
23910
|
-
}
|
|
23911
|
-
|
|
23912
|
-
/**
|
|
23913
|
-
* Retrieves a value from local storage asynchronously.
|
|
23914
|
-
* @param key The key of the value to retrieve.
|
|
23915
|
-
* @returns The value associated with the key, or null if the key does not exist.
|
|
23916
|
-
*/
|
|
23917
|
-
static async getItem(key) {
|
|
23918
|
-
return LocalStorage.getInstance().getItem(key);
|
|
23919
|
-
}
|
|
23920
|
-
|
|
23921
|
-
/**
|
|
23922
|
-
* Stores a value in local storage asynchronously.
|
|
23923
|
-
* @param key The key under which the value will be stored.
|
|
23924
|
-
* @param value The value to store.
|
|
23925
|
-
*/
|
|
23926
|
-
static async setItem(key, value) {
|
|
23927
|
-
return LocalStorage.getInstance().setItem(key, value);
|
|
23928
|
-
}
|
|
23929
|
-
|
|
23930
|
-
/**
|
|
23931
|
-
* Removes a value from local storage asynchronously.
|
|
23932
|
-
* @param key The key of the value to remove.
|
|
23933
|
-
*/
|
|
23934
|
-
static async removeItem(key) {
|
|
23935
|
-
return LocalStorage.getInstance().removeItem(key);
|
|
23936
|
-
}
|
|
23937
|
-
|
|
23938
|
-
/**
|
|
23939
|
-
* Clears all key-value pairs from local storage asynchronously.
|
|
23940
|
-
*/
|
|
23941
|
-
static async clear() {
|
|
23942
|
-
return LocalStorage.getInstance().clear();
|
|
23943
|
-
}
|
|
23944
|
-
|
|
23945
|
-
// Instance methods for custom implementations
|
|
23946
|
-
}
|
|
23947
|
-
LocalStorage.instance = void 0;
|
|
23948
|
-
|
|
23949
|
-
/***/ }),
|
|
23950
|
-
|
|
23951
|
-
/***/ "../../dist/@frontegg/redux-store/toolkit/SessionStorage.js":
|
|
23952
|
-
/*!******************************************************************!*\
|
|
23953
|
-
!*** ../../dist/@frontegg/redux-store/toolkit/SessionStorage.js ***!
|
|
23954
|
-
\******************************************************************/
|
|
23955
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
23956
|
-
|
|
23957
|
-
"use strict";
|
|
23958
|
-
__webpack_require__.r(__webpack_exports__);
|
|
23959
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
23960
|
-
/* harmony export */ SessionStorage: () => (/* binding */ SessionStorage)
|
|
23961
|
-
/* harmony export */ });
|
|
23962
|
-
/**
|
|
23963
|
-
* SessionStorage is a singleton instance proxy that is responsible for managing the session storage of the application.
|
|
23964
|
-
* It can be overridden by a framework or application to provide a custom implementation for mobile or server-side rendering.
|
|
23965
|
-
*/
|
|
23966
|
-
class SessionStorage {
|
|
23967
|
-
constructor() {
|
|
23968
|
-
this.nativeInstance = typeof window !== 'undefined' ? window.sessionStorage : typeof __webpack_require__.g !== 'undefined' ? __webpack_require__.g.sessionStorage : null;
|
|
23969
|
-
this.getItem = async key => {
|
|
23970
|
-
return Promise.resolve(this.nativeInstance.getItem(key));
|
|
23971
|
-
};
|
|
23972
|
-
this.setItem = async (key, value) => {
|
|
23973
|
-
return Promise.resolve(this.nativeInstance.setItem(key, value));
|
|
23974
|
-
};
|
|
23975
|
-
this.removeItem = async key => {
|
|
23976
|
-
return Promise.resolve(this.nativeInstance.removeItem(key));
|
|
23977
|
-
};
|
|
23978
|
-
this.clear = async () => {
|
|
23979
|
-
return Promise.resolve(this.nativeInstance.clear());
|
|
23980
|
-
};
|
|
23981
|
-
}
|
|
23982
|
-
/**
|
|
23983
|
-
* Retrieves the singleton instance of SessionStorage.
|
|
23984
|
-
* If an instance has been overridden, it returns the overridden instance.
|
|
23985
|
-
* Otherwise, it creates and returns a default instance.
|
|
23986
|
-
*/
|
|
23987
|
-
static getInstance() {
|
|
23988
|
-
if (!SessionStorage.instance) {
|
|
23989
|
-
SessionStorage.instance = new SessionStorage();
|
|
23990
|
-
}
|
|
23991
|
-
return SessionStorage.instance;
|
|
23992
|
-
}
|
|
23993
|
-
|
|
23994
|
-
/**
|
|
23995
|
-
* Overrides the current SessionStorage instance with a custom implementation.
|
|
23996
|
-
* This can be used to provide a different storage mechanism for mobile or server-side environments.
|
|
23997
|
-
* @param customInstance The custom implementation of SessionStorage.
|
|
23998
|
-
*/
|
|
23999
|
-
static overrideInstance(customInstance) {
|
|
24000
|
-
SessionStorage.instance.nativeInstance = customInstance;
|
|
24001
|
-
}
|
|
24002
|
-
|
|
24003
|
-
/**
|
|
24004
|
-
* Retrieves a value from session storage asynchronously.
|
|
24005
|
-
* @param key The key of the value to retrieve.
|
|
24006
|
-
* @returns The value associated with the key, or null if the key does not exist.
|
|
24007
|
-
*/
|
|
24008
|
-
static async getItem(key) {
|
|
24009
|
-
return SessionStorage.getInstance().getItem(key);
|
|
24010
|
-
}
|
|
24011
|
-
|
|
24012
|
-
/**
|
|
24013
|
-
* Stores a value in session storage asynchronously.
|
|
24014
|
-
* @param key The key under which the value will be stored.
|
|
24015
|
-
* @param value The value to store.
|
|
24016
|
-
*/
|
|
24017
|
-
static async setItem(key, value) {
|
|
24018
|
-
return SessionStorage.getInstance().setItem(key, value);
|
|
24019
|
-
}
|
|
24020
|
-
|
|
24021
|
-
/**
|
|
24022
|
-
* Removes a value from session storage asynchronously.
|
|
24023
|
-
* @param key The key of the value to remove.
|
|
24024
|
-
*/
|
|
24025
|
-
static async removeItem(key) {
|
|
24026
|
-
return SessionStorage.getInstance().removeItem(key);
|
|
24027
|
-
}
|
|
24028
|
-
|
|
24029
|
-
/**
|
|
24030
|
-
* Clears all key-value pairs from session storage asynchronously.
|
|
24031
|
-
*/
|
|
24032
|
-
static async clear() {
|
|
24033
|
-
return SessionStorage.getInstance().clear();
|
|
24034
|
-
}
|
|
24035
|
-
|
|
24036
|
-
// Instance methods for custom implementations
|
|
24037
|
-
}
|
|
24038
|
-
SessionStorage.instance = void 0;
|
|
24039
|
-
|
|
24040
|
-
/***/ }),
|
|
24041
|
-
|
|
24042
|
-
/***/ "../../dist/@frontegg/redux-store/toolkit/WindowLocation.js":
|
|
24043
|
-
/*!******************************************************************!*\
|
|
24044
|
-
!*** ../../dist/@frontegg/redux-store/toolkit/WindowLocation.js ***!
|
|
24045
|
-
\******************************************************************/
|
|
24046
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
24047
|
-
|
|
24048
|
-
"use strict";
|
|
24049
|
-
__webpack_require__.r(__webpack_exports__);
|
|
24050
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
24051
|
-
/* harmony export */ WindowLocation: () => (/* binding */ WindowLocation)
|
|
24052
|
-
/* harmony export */ });
|
|
24053
|
-
/**
|
|
24054
|
-
* WindowLocation is a singleton instance proxy that is responsible for managing location-related operations.
|
|
24055
|
-
* It can be overridden by a framework or application to provide a custom implementation for mobile or server-side rendering.
|
|
24056
|
-
*/
|
|
24057
|
-
class WindowLocation {
|
|
24058
|
-
constructor() {
|
|
24059
|
-
this.nativeInstance = typeof window !== 'undefined' ? window.location : typeof __webpack_require__.g !== 'undefined' ? __webpack_require__.g.location : null;
|
|
24060
|
-
}
|
|
24061
|
-
/**
|
|
24062
|
-
* Retrieves the singleton instance of WindowLocation.
|
|
24063
|
-
* If an instance has been overridden, it returns the overridden instance.
|
|
24064
|
-
* Otherwise, it creates and returns a default instance.
|
|
24065
|
-
*/
|
|
24066
|
-
static getInstance() {
|
|
24067
|
-
if (!WindowLocation.instance) {
|
|
24068
|
-
WindowLocation.instance = new WindowLocation();
|
|
24069
|
-
}
|
|
24070
|
-
return WindowLocation.instance;
|
|
24071
|
-
}
|
|
24072
|
-
|
|
24073
|
-
/**
|
|
24074
|
-
* Overrides the current WindowLocation instance with a custom implementation.
|
|
24075
|
-
* This can be used to provide a different mechanism for handling location in mobile or server-side environments.
|
|
24076
|
-
* @param customInstance The custom implementation of WindowLocation.
|
|
24077
|
-
*/
|
|
24078
|
-
static overrideInstance(customInstance) {
|
|
24079
|
-
WindowLocation.instance.nativeInstance = customInstance;
|
|
24080
|
-
}
|
|
24081
|
-
|
|
24082
|
-
// Static getters and setters
|
|
24083
|
-
|
|
24084
|
-
/**
|
|
24085
|
-
* Retrieves the origins of the ancestor browsing contexts as a DOMStringList.
|
|
24086
|
-
*/
|
|
24087
|
-
static get ancestorOrigins() {
|
|
24088
|
-
return WindowLocation.getInstance().ancestorOrigins;
|
|
24089
|
-
}
|
|
24090
|
-
|
|
24091
|
-
/**
|
|
24092
|
-
* Retrieves the fragment identifier (hash) of the current URL.
|
|
24093
|
-
* Can be set to navigate to the same URL with a different fragment.
|
|
24094
|
-
*/
|
|
24095
|
-
static get hash() {
|
|
24096
|
-
return WindowLocation.getInstance().hash;
|
|
24097
|
-
}
|
|
24098
|
-
static set hash(value) {
|
|
24099
|
-
WindowLocation.getInstance().hash = value;
|
|
24100
|
-
}
|
|
24101
|
-
|
|
24102
|
-
/**
|
|
24103
|
-
* Retrieves the host (hostname and port) of the current URL.
|
|
24104
|
-
* Can be set to navigate to the same URL with a different host and port.
|
|
24105
|
-
*/
|
|
24106
|
-
static get host() {
|
|
24107
|
-
return WindowLocation.getInstance().host;
|
|
24108
|
-
}
|
|
24109
|
-
static set host(value) {
|
|
24110
|
-
WindowLocation.getInstance().host = value;
|
|
24111
|
-
}
|
|
24112
|
-
|
|
24113
|
-
/**
|
|
24114
|
-
* Retrieves the hostname of the current URL.
|
|
24115
|
-
* Can be set to navigate to the same URL with a different hostname.
|
|
24116
|
-
*/
|
|
24117
|
-
static get hostname() {
|
|
24118
|
-
return WindowLocation.getInstance().hostname;
|
|
24119
|
-
}
|
|
24120
|
-
static set hostname(value) {
|
|
24121
|
-
WindowLocation.getInstance().hostname = value;
|
|
24122
|
-
}
|
|
24123
|
-
|
|
24124
|
-
/**
|
|
24125
|
-
* Retrieves the full URL as a string.
|
|
24126
|
-
* Can be set to navigate to the given URL.
|
|
24127
|
-
*/
|
|
24128
|
-
static get href() {
|
|
24129
|
-
return WindowLocation.getInstance().href;
|
|
24130
|
-
}
|
|
24131
|
-
static set href(value) {
|
|
24132
|
-
WindowLocation.getInstance().href = value;
|
|
24133
|
-
}
|
|
24134
|
-
|
|
24135
|
-
/**
|
|
24136
|
-
* Retrieves the origin of the current URL, which is the scheme, domain, and port.
|
|
24137
|
-
*/
|
|
24138
|
-
static get origin() {
|
|
24139
|
-
return WindowLocation.getInstance().origin;
|
|
24140
|
-
}
|
|
24141
|
-
|
|
24142
|
-
/**
|
|
24143
|
-
* Retrieves the path of the current URL.
|
|
24144
|
-
* Can be set to navigate to the same URL with a different path.
|
|
24145
|
-
*/
|
|
24146
|
-
static get pathname() {
|
|
24147
|
-
return WindowLocation.getInstance().pathname;
|
|
24148
|
-
}
|
|
24149
|
-
static set pathname(value) {
|
|
24150
|
-
WindowLocation.getInstance().pathname = value;
|
|
24151
|
-
}
|
|
24152
|
-
|
|
24153
|
-
/**
|
|
24154
|
-
* Retrieves the port number of the current URL.
|
|
24155
|
-
* Can be set to navigate to the same URL with a different port.
|
|
24156
|
-
*/
|
|
24157
|
-
static get port() {
|
|
24158
|
-
return WindowLocation.getInstance().port;
|
|
24159
|
-
}
|
|
24160
|
-
static set port(value) {
|
|
24161
|
-
WindowLocation.getInstance().port = value;
|
|
24162
|
-
}
|
|
24163
|
-
|
|
24164
|
-
/**
|
|
24165
|
-
* Retrieves the protocol scheme of the current URL (e.g., "http:" or "https:").
|
|
24166
|
-
* Can be set to navigate to the same URL with a different protocol.
|
|
24167
|
-
*/
|
|
24168
|
-
static get protocol() {
|
|
24169
|
-
return WindowLocation.getInstance().protocol;
|
|
24170
|
-
}
|
|
24171
|
-
static set protocol(value) {
|
|
24172
|
-
WindowLocation.getInstance().protocol = value;
|
|
24173
|
-
}
|
|
24174
|
-
|
|
24175
|
-
/**
|
|
24176
|
-
* Retrieves the query string of the current URL.
|
|
24177
|
-
* Can be set to navigate to the same URL with a different query.
|
|
24178
|
-
*/
|
|
24179
|
-
static get search() {
|
|
24180
|
-
return WindowLocation.getInstance().search;
|
|
24181
|
-
}
|
|
24182
|
-
static set search(value) {
|
|
24183
|
-
WindowLocation.getInstance().search = value;
|
|
24184
|
-
}
|
|
24185
|
-
|
|
24186
|
-
/**
|
|
24187
|
-
* Navigates to a new URL.
|
|
24188
|
-
* @param url The URL to navigate to.
|
|
24189
|
-
*/
|
|
24190
|
-
static assign(url) {
|
|
24191
|
-
WindowLocation.getInstance().assign(url);
|
|
24192
|
-
}
|
|
24193
|
-
|
|
24194
|
-
/**
|
|
24195
|
-
* Reloads the current page.
|
|
24196
|
-
*/
|
|
24197
|
-
static reload() {
|
|
24198
|
-
WindowLocation.getInstance().reload();
|
|
24199
|
-
}
|
|
24200
|
-
|
|
24201
|
-
/**
|
|
24202
|
-
* Replaces the current page with the given URL without creating a new entry in the session history.
|
|
24203
|
-
* @param url The URL to navigate to.
|
|
24204
|
-
*/
|
|
24205
|
-
static replace(url) {
|
|
24206
|
-
WindowLocation.getInstance().replace(url);
|
|
24207
|
-
}
|
|
24208
|
-
|
|
24209
|
-
// Instance methods for custom implementations
|
|
24210
|
-
|
|
24211
|
-
/**
|
|
24212
|
-
* Retrieves the origins of the ancestor browsing contexts as a DOMStringList.
|
|
24213
|
-
*/
|
|
24214
|
-
get ancestorOrigins() {
|
|
24215
|
-
return this.nativeInstance.ancestorOrigins;
|
|
24216
|
-
}
|
|
24217
|
-
|
|
24218
|
-
/**
|
|
24219
|
-
* Retrieves the fragment identifier (hash) of the current URL.
|
|
24220
|
-
* Can be set to navigate to the same URL with a different fragment.
|
|
24221
|
-
*/
|
|
24222
|
-
get hash() {
|
|
24223
|
-
return this.nativeInstance.hash;
|
|
24224
|
-
}
|
|
24225
|
-
set hash(value) {
|
|
24226
|
-
this.nativeInstance.hash = value;
|
|
24227
|
-
}
|
|
24228
|
-
|
|
24229
|
-
/**
|
|
24230
|
-
* Retrieves the host (hostname and port) of the current URL.
|
|
24231
|
-
* Can be set to navigate to the same URL with a different host and port.
|
|
24232
|
-
*/
|
|
24233
|
-
get host() {
|
|
24234
|
-
return this.nativeInstance.host;
|
|
24235
|
-
}
|
|
24236
|
-
set host(value) {
|
|
24237
|
-
this.nativeInstance.host = value;
|
|
24238
|
-
}
|
|
24239
|
-
|
|
24240
|
-
/**
|
|
24241
|
-
* Retrieves the hostname of the current URL.
|
|
24242
|
-
* Can be set to navigate to the same URL with a different hostname.
|
|
24243
|
-
*/
|
|
24244
|
-
get hostname() {
|
|
24245
|
-
return this.nativeInstance.hostname;
|
|
24246
|
-
}
|
|
24247
|
-
set hostname(value) {
|
|
24248
|
-
this.nativeInstance.hostname = value;
|
|
24249
|
-
}
|
|
24250
|
-
|
|
24251
|
-
/**
|
|
24252
|
-
* Retrieves the full URL as a string.
|
|
24253
|
-
* Can be set to navigate to the given URL.
|
|
24254
|
-
*/
|
|
24255
|
-
get href() {
|
|
24256
|
-
return this.nativeInstance.href;
|
|
24257
|
-
}
|
|
24258
|
-
set href(value) {
|
|
24259
|
-
this.nativeInstance.href = value;
|
|
24260
|
-
}
|
|
24261
|
-
|
|
24262
|
-
/**
|
|
24263
|
-
* Retrieves the origin of the current URL, which is the scheme, domain, and port.
|
|
24264
|
-
*/
|
|
24265
|
-
get origin() {
|
|
24266
|
-
return this.nativeInstance.origin;
|
|
24267
|
-
}
|
|
24268
|
-
|
|
24269
|
-
/**
|
|
24270
|
-
* Retrieves the path of the current URL.
|
|
24271
|
-
* Can be set to navigate to the same URL with a different path.
|
|
24272
|
-
*/
|
|
24273
|
-
get pathname() {
|
|
24274
|
-
return this.nativeInstance.pathname;
|
|
24275
|
-
}
|
|
24276
|
-
set pathname(value) {
|
|
24277
|
-
this.nativeInstance.pathname = value;
|
|
24278
|
-
}
|
|
24279
|
-
|
|
24280
|
-
/**
|
|
24281
|
-
* Retrieves the port number of the current URL.
|
|
24282
|
-
* Can be set to navigate to the same URL with a different port.
|
|
24283
|
-
*/
|
|
24284
|
-
get port() {
|
|
24285
|
-
return this.nativeInstance.port;
|
|
24286
|
-
}
|
|
24287
|
-
set port(value) {
|
|
24288
|
-
this.nativeInstance.port = value;
|
|
24289
|
-
}
|
|
24290
|
-
|
|
24291
|
-
/**
|
|
24292
|
-
* Retrieves the protocol scheme of the current URL (e.g., "http:" or "https:").
|
|
24293
|
-
* Can be set to navigate to the same URL with a different protocol.
|
|
24294
|
-
*/
|
|
24295
|
-
get protocol() {
|
|
24296
|
-
return this.nativeInstance.protocol;
|
|
24297
|
-
}
|
|
24298
|
-
set protocol(value) {
|
|
24299
|
-
this.nativeInstance.protocol = value;
|
|
24300
|
-
}
|
|
24301
|
-
|
|
24302
|
-
/**
|
|
24303
|
-
* Retrieves the query string of the current URL.
|
|
24304
|
-
* Can be set to navigate to the same URL with a different query.
|
|
24305
|
-
*/
|
|
24306
|
-
get search() {
|
|
24307
|
-
return this.nativeInstance.search;
|
|
24308
|
-
}
|
|
24309
|
-
set search(value) {
|
|
24310
|
-
this.nativeInstance.search = value;
|
|
24311
|
-
}
|
|
24312
|
-
|
|
24313
|
-
/**
|
|
24314
|
-
* Navigates to a new URL.
|
|
24315
|
-
* @param url The URL to navigate to.
|
|
24316
|
-
*/
|
|
24317
|
-
assign(url) {
|
|
24318
|
-
this.nativeInstance.assign(url);
|
|
24319
|
-
}
|
|
24320
|
-
|
|
24321
|
-
/**
|
|
24322
|
-
* Reloads the current page.
|
|
24323
|
-
*/
|
|
24324
|
-
reload() {
|
|
24325
|
-
this.nativeInstance.reload();
|
|
24326
|
-
}
|
|
24327
|
-
|
|
24328
|
-
/**
|
|
24329
|
-
* Replaces the current page with the given URL without creating a new entry in the session history.
|
|
24330
|
-
* @param url The URL to navigate to.
|
|
24331
|
-
*/
|
|
24332
|
-
replace(url) {
|
|
24333
|
-
this.nativeInstance.replace(url);
|
|
24334
|
-
}
|
|
24335
|
-
}
|
|
24336
|
-
WindowLocation.instance = void 0;
|
|
24337
|
-
|
|
24338
|
-
/***/ }),
|
|
24339
|
-
|
|
24340
23820
|
/***/ "../../dist/@frontegg/redux-store/toolkit/index.js":
|
|
24341
23821
|
/*!*********************************************************!*\
|
|
24342
23822
|
!*** ../../dist/@frontegg/redux-store/toolkit/index.js ***!
|
|
@@ -24359,7 +23839,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
24359
23839
|
/* harmony export */ GroupRelations: () => (/* reexport safe */ _store__WEBPACK_IMPORTED_MODULE_1__.GroupRelations),
|
|
24360
23840
|
/* harmony export */ GroupsStateKeys: () => (/* reexport safe */ _store__WEBPACK_IMPORTED_MODULE_1__.GroupsStateKeys),
|
|
24361
23841
|
/* harmony export */ ImpersonateStep: () => (/* reexport safe */ _store__WEBPACK_IMPORTED_MODULE_1__.ImpersonateStep),
|
|
24362
|
-
/* harmony export */ LocalStorage: () => (/* reexport safe */ _LocalStorage__WEBPACK_IMPORTED_MODULE_4__.LocalStorage),
|
|
24363
23842
|
/* harmony export */ LoginActionTypes: () => (/* reexport safe */ _store__WEBPACK_IMPORTED_MODULE_1__.LoginActionTypes),
|
|
24364
23843
|
/* harmony export */ LoginFlow: () => (/* reexport safe */ _store__WEBPACK_IMPORTED_MODULE_1__.LoginFlow),
|
|
24365
23844
|
/* harmony export */ LoginStep: () => (/* reexport safe */ _store__WEBPACK_IMPORTED_MODULE_1__.LoginStep),
|
|
@@ -24371,11 +23850,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
24371
23850
|
/* harmony export */ SSOStateKeys: () => (/* reexport safe */ _store__WEBPACK_IMPORTED_MODULE_1__.SSOStateKeys),
|
|
24372
23851
|
/* harmony export */ SamlVendors: () => (/* reexport safe */ _store__WEBPACK_IMPORTED_MODULE_1__.SamlVendors),
|
|
24373
23852
|
/* harmony export */ SecurityCenterStateKeys: () => (/* reexport safe */ _store__WEBPACK_IMPORTED_MODULE_1__.SecurityCenterStateKeys),
|
|
24374
|
-
/* harmony export */ SessionStorage: () => (/* reexport safe */ _SessionStorage__WEBPACK_IMPORTED_MODULE_5__.SessionStorage),
|
|
24375
23853
|
/* harmony export */ SignUpStage: () => (/* reexport safe */ _store__WEBPACK_IMPORTED_MODULE_1__.SignUpStage),
|
|
24376
23854
|
/* harmony export */ TeamStateKeys: () => (/* reexport safe */ _store__WEBPACK_IMPORTED_MODULE_1__.TeamStateKeys),
|
|
24377
23855
|
/* harmony export */ UserVeirifedOriginTypes: () => (/* reexport safe */ _store__WEBPACK_IMPORTED_MODULE_1__.UserVeirifedOriginTypes),
|
|
24378
|
-
/* harmony export */ WindowLocation: () => (/* reexport safe */ _WindowLocation__WEBPACK_IMPORTED_MODULE_6__.WindowLocation),
|
|
24379
23856
|
/* harmony export */ buildAuthActions: () => (/* reexport safe */ _store__WEBPACK_IMPORTED_MODULE_1__.buildAuthActions),
|
|
24380
23857
|
/* harmony export */ createAuthState: () => (/* reexport safe */ _store__WEBPACK_IMPORTED_MODULE_1__.createAuthState),
|
|
24381
23858
|
/* harmony export */ createFronteggStore: () => (/* reexport safe */ _store__WEBPACK_IMPORTED_MODULE_1__.createFronteggStore),
|
|
@@ -24392,12 +23869,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
24392
23869
|
/* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./store */ "../../dist/@frontegg/redux-store/toolkit/store.js");
|
|
24393
23870
|
/* harmony import */ var _valtio__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../valtio */ "../../dist/@frontegg/redux-store/valtio/valtio.js");
|
|
24394
23871
|
/* harmony import */ var _proxy__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./proxy */ "../../dist/@frontegg/redux-store/toolkit/proxy.js");
|
|
24395
|
-
/* harmony import */ var _LocalStorage__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./LocalStorage */ "../../dist/@frontegg/redux-store/toolkit/LocalStorage.js");
|
|
24396
|
-
/* harmony import */ var _SessionStorage__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./SessionStorage */ "../../dist/@frontegg/redux-store/toolkit/SessionStorage.js");
|
|
24397
|
-
/* harmony import */ var _WindowLocation__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./WindowLocation */ "../../dist/@frontegg/redux-store/toolkit/WindowLocation.js");
|
|
24398
|
-
|
|
24399
|
-
|
|
24400
|
-
|
|
24401
23872
|
|
|
24402
23873
|
|
|
24403
23874
|
|
|
@@ -24593,7 +24064,7 @@ const createStore = options => {
|
|
|
24593
24064
|
auditLogs: auditsState,
|
|
24594
24065
|
audits: oldAuditsState
|
|
24595
24066
|
});
|
|
24596
|
-
if (typeof window !== 'undefined' && (
|
|
24067
|
+
if (typeof window !== 'undefined' && (localStorage['DEBUG_FRONTEGG_STORE'] === 'true' || "development" === 'development')) {
|
|
24597
24068
|
(0,_valtio__WEBPACK_IMPORTED_MODULE_11__.devtools)(store, {
|
|
24598
24069
|
name: `${appName} Store`,
|
|
24599
24070
|
enabled: true
|
|
@@ -24744,7 +24215,7 @@ function devtools(proxyObject, options) {
|
|
|
24744
24215
|
let extension;
|
|
24745
24216
|
try {
|
|
24746
24217
|
// @ts-ignore
|
|
24747
|
-
extension = enabled &&
|
|
24218
|
+
extension = enabled && window.__REDUX_DEVTOOLS_EXTENSION__;
|
|
24748
24219
|
} catch {
|
|
24749
24220
|
// ignored
|
|
24750
24221
|
}
|
|
@@ -25904,7 +25375,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
25904
25375
|
/* harmony export */ });
|
|
25905
25376
|
/* harmony import */ var _ThemeOptions__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ThemeOptions */ "../../dist/@frontegg/types/ThemeOptions/index.js");
|
|
25906
25377
|
/* harmony import */ var _Metadata__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Metadata */ "../../dist/@frontegg/types/Metadata/index.js");
|
|
25907
|
-
/** @license Frontegg v7.10.0
|
|
25378
|
+
/** @license Frontegg v7.10.0
|
|
25908
25379
|
*
|
|
25909
25380
|
* This source code is licensed under the MIT license found in the
|
|
25910
25381
|
* LICENSE file in the root directory of this source tree.
|
|
@@ -34412,18 +33883,6 @@ const replaceNewProxy = (fn) => {
|
|
|
34412
33883
|
/******/ };
|
|
34413
33884
|
/******/ })();
|
|
34414
33885
|
/******/
|
|
34415
|
-
/******/ /* webpack/runtime/global */
|
|
34416
|
-
/******/ (() => {
|
|
34417
|
-
/******/ __webpack_require__.g = (function() {
|
|
34418
|
-
/******/ if (typeof globalThis === 'object') return globalThis;
|
|
34419
|
-
/******/ try {
|
|
34420
|
-
/******/ return this || new Function('return this')();
|
|
34421
|
-
/******/ } catch (e) {
|
|
34422
|
-
/******/ if (typeof window === 'object') return window;
|
|
34423
|
-
/******/ }
|
|
34424
|
-
/******/ })();
|
|
34425
|
-
/******/ })();
|
|
34426
|
-
/******/
|
|
34427
33886
|
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
|
34428
33887
|
/******/ (() => {
|
|
34429
33888
|
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
|