@frontegg/js 7.8.0 → 7.10.0-alpha.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 +753 -212
- package/umd/frontegg.production.min.js +1 -1
- package/version.js +1 -1
|
@@ -1586,7 +1586,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1586
1586
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
1587
1587
|
/* harmony export */ });
|
|
1588
1588
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
|
|
1589
|
-
cdnVersion: '7.
|
|
1589
|
+
cdnVersion: '7.10.0-alpha.0'
|
|
1590
1590
|
});
|
|
1591
1591
|
|
|
1592
1592
|
/***/ }),
|
|
@@ -2493,7 +2493,10 @@ 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
|
-
|
|
2496
|
+
onRedirectTo(user.redirectLocation, {
|
|
2497
|
+
replace: true,
|
|
2498
|
+
refresh: true
|
|
2499
|
+
});
|
|
2497
2500
|
return;
|
|
2498
2501
|
}
|
|
2499
2502
|
if ((0,_helpers__WEBPACK_IMPORTED_MODULE_7__.isMfaRequired)(user, store.root.appName)) {
|
|
@@ -4600,11 +4603,14 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
4600
4603
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
4601
4604
|
/* harmony export */ });
|
|
4602
4605
|
/* 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");
|
|
4603
|
-
/* harmony import */ var
|
|
4604
|
-
/* harmony import */ var
|
|
4605
|
-
/* harmony import */ var
|
|
4606
|
-
/* harmony import */ var
|
|
4607
|
-
/* harmony import */ var
|
|
4606
|
+
/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../helpers */ "../../dist/@frontegg/redux-store/auth/LoginState/helpers.js");
|
|
4607
|
+
/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../constants */ "../../dist/@frontegg/redux-store/constants.js");
|
|
4608
|
+
/* harmony import */ var _StepUpState_consts__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../StepUpState/consts */ "../../dist/@frontegg/redux-store/auth/StepUpState/consts.js");
|
|
4609
|
+
/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../helpers */ "../../dist/@frontegg/redux-store/helpers/common.js");
|
|
4610
|
+
/* harmony import */ var _toolkit__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../toolkit */ "../../dist/@frontegg/redux-store/toolkit/WindowLocation.js");
|
|
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
|
+
|
|
4608
4614
|
|
|
4609
4615
|
|
|
4610
4616
|
|
|
@@ -4622,11 +4628,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
4622
4628
|
* In case the url is equal to the window.location.origin, it will return an empty string
|
|
4623
4629
|
*/
|
|
4624
4630
|
function cleanUrlIfSameOrigin(url) {
|
|
4625
|
-
|
|
4626
|
-
if (!url.startsWith((_window = window) == null ? void 0 : _window.location.origin)) {
|
|
4631
|
+
if (!url.startsWith(_toolkit__WEBPACK_IMPORTED_MODULE_1__.WindowLocation.origin)) {
|
|
4627
4632
|
return url;
|
|
4628
4633
|
}
|
|
4629
|
-
return url.replace(
|
|
4634
|
+
return url.replace(_toolkit__WEBPACK_IMPORTED_MODULE_1__.WindowLocation.origin, '');
|
|
4630
4635
|
}
|
|
4631
4636
|
|
|
4632
4637
|
/**
|
|
@@ -4668,7 +4673,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
4668
4673
|
allowedRedirectOrigins = []
|
|
4669
4674
|
} = store.auth;
|
|
4670
4675
|
if (customLoginAuthenticatedUrl) {
|
|
4671
|
-
return (0,
|
|
4676
|
+
return (0,_helpers__WEBPACK_IMPORTED_MODULE_2__.getPathAndSearchParamsFromUrl)(customLoginAuthenticatedUrl);
|
|
4672
4677
|
}
|
|
4673
4678
|
const {
|
|
4674
4679
|
authenticatedUrl,
|
|
@@ -4677,11 +4682,11 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
4677
4682
|
socialLoginCallbackUrl,
|
|
4678
4683
|
activateUrl
|
|
4679
4684
|
} = routes;
|
|
4680
|
-
let finalUrl =
|
|
4685
|
+
let finalUrl = await _toolkit__WEBPACK_IMPORTED_MODULE_3__.LocalStorage.getItem(_constants__WEBPACK_IMPORTED_MODULE_4__.FRONTEGG_AFTER_AUTH_REDIRECT_URL);
|
|
4681
4686
|
if (!finalUrl || [loginUrl, logoutUrl, socialLoginCallbackUrl, activateUrl].includes(finalUrl)) {
|
|
4682
4687
|
finalUrl = authenticatedUrl;
|
|
4683
4688
|
}
|
|
4684
|
-
const redirectUrl = (0,
|
|
4689
|
+
const redirectUrl = await (0,_helpers__WEBPACK_IMPORTED_MODULE_2__.getRedirectUrl)({
|
|
4685
4690
|
authenticatedUrl: finalUrl,
|
|
4686
4691
|
includeQueryParam,
|
|
4687
4692
|
enforceRedirectToSameSite,
|
|
@@ -4715,12 +4720,11 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
4715
4720
|
// we don't want to remove the FRONTEGG_AFTER_AUTH_REDIRECT_URL when we are in the step up flow
|
|
4716
4721
|
redirectUrl = forceStepUpUrl;
|
|
4717
4722
|
} else {
|
|
4718
|
-
var _window3;
|
|
4719
4723
|
if (shouldStepUpDuringLogin) {
|
|
4720
4724
|
// getUrlForAfterAuthNavigation give priority to the redirectUrl
|
|
4721
4725
|
// avoiding use of getUrlForAfterAuthNavigation because we don't want to use the redirectUrl for magic link for example
|
|
4722
|
-
const localStorageRedirectUrl =
|
|
4723
|
-
if (localStorageRedirectUrl && !(0,
|
|
4726
|
+
const localStorageRedirectUrl = await _toolkit__WEBPACK_IMPORTED_MODULE_3__.LocalStorage.getItem(_constants__WEBPACK_IMPORTED_MODULE_4__.FRONTEGG_AFTER_AUTH_REDIRECT_URL);
|
|
4727
|
+
if (localStorageRedirectUrl && !(0,_helpers__WEBPACK_IMPORTED_MODULE_2__.isAbsoluteUrl)(localStorageRedirectUrl)) {
|
|
4724
4728
|
redirectUrl = localStorageRedirectUrl;
|
|
4725
4729
|
}
|
|
4726
4730
|
}
|
|
@@ -4730,9 +4734,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
4730
4734
|
preventRedirectUrlOriginCleaning
|
|
4731
4735
|
});
|
|
4732
4736
|
}
|
|
4733
|
-
|
|
4737
|
+
await _toolkit__WEBPACK_IMPORTED_MODULE_3__.LocalStorage.removeItem(_constants__WEBPACK_IMPORTED_MODULE_4__.FRONTEGG_AFTER_AUTH_REDIRECT_URL);
|
|
4734
4738
|
}
|
|
4735
|
-
await (0,
|
|
4739
|
+
await (0,_helpers__WEBPACK_IMPORTED_MODULE_5__.delay)(200);
|
|
4736
4740
|
await resetStateAction();
|
|
4737
4741
|
onRedirectTo(redirectUrl, {
|
|
4738
4742
|
refresh: redirectUrl.startsWith('http')
|
|
@@ -4744,20 +4748,19 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
4744
4748
|
* Handling also step up scenario when user silently logout to continue to step up
|
|
4745
4749
|
*/
|
|
4746
4750
|
const afterAuthNavigation = async payload => {
|
|
4747
|
-
var
|
|
4751
|
+
var _payload$preventRedir;
|
|
4748
4752
|
const {
|
|
4749
4753
|
customLoginAuthenticatedUrl,
|
|
4750
4754
|
stepUpUrl
|
|
4751
4755
|
} = store.auth.routes;
|
|
4752
4756
|
|
|
4753
4757
|
// 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
|
|
4754
|
-
const shouldStepUp =
|
|
4758
|
+
const shouldStepUp = await _toolkit__WEBPACK_IMPORTED_MODULE_3__.LocalStorage.getItem(_StepUpState_consts__WEBPACK_IMPORTED_MODULE_6__.SHOULD_STEP_UP_KEY);
|
|
4755
4759
|
const user = store.auth.user;
|
|
4756
4760
|
if (shouldStepUp) {
|
|
4757
|
-
|
|
4758
|
-
(_window5 = window) == null ? void 0 : _window5.localStorage.removeItem(_StepUpState_consts__WEBPACK_IMPORTED_MODULE_4__.SHOULD_STEP_UP_KEY);
|
|
4761
|
+
await _toolkit__WEBPACK_IMPORTED_MODULE_3__.LocalStorage.removeItem(_StepUpState_consts__WEBPACK_IMPORTED_MODULE_6__.SHOULD_STEP_UP_KEY);
|
|
4759
4762
|
}
|
|
4760
|
-
if (stepUpUrl && shouldStepUp && !(0,
|
|
4763
|
+
if (stepUpUrl && shouldStepUp && !(0,_StepUpState_helpers__WEBPACK_IMPORTED_MODULE_7__.isSteppedUp)(user)) {
|
|
4761
4764
|
return afterAuthNavigationUtil(actions.resetLoginState, {
|
|
4762
4765
|
forceStepUpUrl: stepUpUrl
|
|
4763
4766
|
});
|
|
@@ -4805,6 +4808,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
4805
4808
|
/* harmony import */ var _frontegg_rest_api__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @frontegg/rest-api */ "../../node_modules/@frontegg/rest-api/feature-flags/index.js");
|
|
4806
4809
|
/* harmony import */ var _MfaState_interfaces__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../MfaState/interfaces */ "../../dist/@frontegg/redux-store/auth/MfaState/interfaces.js");
|
|
4807
4810
|
/* 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
|
+
|
|
4808
4813
|
|
|
4809
4814
|
|
|
4810
4815
|
|
|
@@ -4879,7 +4884,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
4879
4884
|
loading: false
|
|
4880
4885
|
});
|
|
4881
4886
|
if (user.id) {
|
|
4882
|
-
|
|
4887
|
+
await _toolkit__WEBPACK_IMPORTED_MODULE_3__.LocalStorage.setItem('userId', user.id);
|
|
4883
4888
|
}
|
|
4884
4889
|
const isAuthenticated = !!user.accessToken;
|
|
4885
4890
|
actions.setAuthState({
|
|
@@ -4913,11 +4918,14 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
4913
4918
|
/* harmony export */ });
|
|
4914
4919
|
/* 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");
|
|
4915
4920
|
/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../helpers */ "../../dist/@frontegg/redux-store/helpers/random.js");
|
|
4916
|
-
/* harmony import */ var
|
|
4917
|
-
/* harmony import */ var
|
|
4921
|
+
/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../constants */ "../../dist/@frontegg/redux-store/constants.js");
|
|
4922
|
+
/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../helpers */ "../../dist/@frontegg/redux-store/auth/LoginState/helpers.js");
|
|
4918
4923
|
/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../helpers */ "../../dist/@frontegg/redux-store/auth/helpers.js");
|
|
4919
|
-
/* harmony import */ var
|
|
4920
|
-
/* harmony import */ var
|
|
4924
|
+
/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../helpers */ "../../dist/@frontegg/redux-store/auth/StepUpState/helpers.js");
|
|
4925
|
+
/* harmony import */ var _StepUpState_consts__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../StepUpState/consts */ "../../dist/@frontegg/redux-store/auth/StepUpState/consts.js");
|
|
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
|
+
|
|
4921
4929
|
|
|
4922
4930
|
|
|
4923
4931
|
|
|
@@ -4965,9 +4973,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
4965
4973
|
const code_challenge = await (0,_helpers__WEBPACK_IMPORTED_MODULE_2__.generateCodeChallenge)(code_verifier);
|
|
4966
4974
|
|
|
4967
4975
|
// We are saving the verifier in session storage to be able to validate the response
|
|
4968
|
-
|
|
4969
|
-
const basename = (0,
|
|
4970
|
-
let redirectUrl = `${
|
|
4976
|
+
await _toolkit__WEBPACK_IMPORTED_MODULE_3__.LocalStorage.setItem(_constants__WEBPACK_IMPORTED_MODULE_4__.HOSTED_LOGIN_VERIFIER_KEY, code_verifier);
|
|
4977
|
+
const basename = (0,_helpers__WEBPACK_IMPORTED_MODULE_5__.getBaseNameWithoutSlashSuffix)(store);
|
|
4978
|
+
let redirectUrl = `${_toolkit__WEBPACK_IMPORTED_MODULE_6__.WindowLocation.origin}${urlStrategy === 'path' ? '' : '#'}${basename != null ? basename : ''}${routes.hostedLoginRedirectUrl}`;
|
|
4971
4979
|
await actions.loadCustomLoginRoutes();
|
|
4972
4980
|
const customLoginSearchParam = (_store$auth$customLog = store.auth.customLoginState) == null ? void 0 : _store$auth$customLog.customLoginSearchParams;
|
|
4973
4981
|
if (customLoginSearchParam) {
|
|
@@ -4995,7 +5003,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
4995
5003
|
params['organization'] = resolvedTenantResult.tenant;
|
|
4996
5004
|
}
|
|
4997
5005
|
}
|
|
4998
|
-
const tenantId = (0,
|
|
5006
|
+
const tenantId = (0,_helpers__WEBPACK_IMPORTED_MODULE_5__.getSearchParam)(_helpers__WEBPACK_IMPORTED_MODULE_5__.TENANT_ID_PARAM_KEY);
|
|
4999
5007
|
if (tenantId) {
|
|
5000
5008
|
params['tenantId'] = tenantId;
|
|
5001
5009
|
}
|
|
@@ -5006,9 +5014,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
5006
5014
|
});
|
|
5007
5015
|
};
|
|
5008
5016
|
const refreshOrRequestHostedLoginAuthorize = async additionalParams => {
|
|
5009
|
-
var _localStorage;
|
|
5010
5017
|
// when the user pause the step up flow we may still have the key in the local storage in hosted - Remove it
|
|
5011
|
-
|
|
5018
|
+
await _toolkit__WEBPACK_IMPORTED_MODULE_3__.LocalStorage.removeItem(_StepUpState_consts__WEBPACK_IMPORTED_MODULE_7__.SHOULD_STEP_UP_KEY);
|
|
5012
5019
|
const disableSilentRefresh = store.auth.disableSilentRefresh;
|
|
5013
5020
|
if ((additionalParams == null ? void 0 : additionalParams['prompt']) === 'login') {
|
|
5014
5021
|
return await requestHostedLoginAuthorize(additionalParams);
|
|
@@ -5023,7 +5030,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
5023
5030
|
}
|
|
5024
5031
|
};
|
|
5025
5032
|
const refreshOrRequestHostedLoginAuthorizeV2 = async payload => {
|
|
5026
|
-
var
|
|
5033
|
+
var _additionalParams;
|
|
5027
5034
|
const {
|
|
5028
5035
|
shouldRedirectToLogin,
|
|
5029
5036
|
firstTime,
|
|
@@ -5033,14 +5040,14 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
5033
5040
|
additionalParams
|
|
5034
5041
|
} = payload != null ? payload : {};
|
|
5035
5042
|
// when the user pause the step up flow we may still have the key in the local storage in hosted - Remove it
|
|
5036
|
-
|
|
5043
|
+
await _toolkit__WEBPACK_IMPORTED_MODULE_3__.LocalStorage.removeItem(_StepUpState_consts__WEBPACK_IMPORTED_MODULE_7__.SHOULD_STEP_UP_KEY);
|
|
5037
5044
|
if (firstTime) {
|
|
5038
5045
|
const urlStrategy = store.root.urlStrategy;
|
|
5039
5046
|
const activeUri = (0,_helpers__WEBPACK_IMPORTED_MODULE_1__.getUri)(urlStrategy);
|
|
5040
5047
|
actions.setAuthState({
|
|
5041
5048
|
isLoading: true
|
|
5042
5049
|
});
|
|
5043
|
-
if ((0,
|
|
5050
|
+
if ((0,_helpers__WEBPACK_IMPORTED_MODULE_5__.isOauthCallbackRoute)(activeUri)) {
|
|
5044
5051
|
return;
|
|
5045
5052
|
}
|
|
5046
5053
|
}
|
|
@@ -5070,11 +5077,11 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
5070
5077
|
const handleHostedLoginCallback = async payload => {
|
|
5071
5078
|
var _store$auth$customLog2;
|
|
5072
5079
|
// Hard coded for now
|
|
5073
|
-
const code_verifier =
|
|
5080
|
+
const code_verifier = (await _toolkit__WEBPACK_IMPORTED_MODULE_3__.LocalStorage.getItem(_constants__WEBPACK_IMPORTED_MODULE_4__.HOSTED_LOGIN_VERIFIER_KEY)) || 'INVALID-CODE-VERIFIER';
|
|
5074
5081
|
const routes = store.auth.routes;
|
|
5075
5082
|
const urlStrategy = store.root.urlStrategy;
|
|
5076
|
-
const basename = (0,
|
|
5077
|
-
let redirectUrl = `${
|
|
5083
|
+
const basename = (0,_helpers__WEBPACK_IMPORTED_MODULE_5__.getBaseNameWithoutSlashSuffix)(store);
|
|
5084
|
+
let redirectUrl = `${_toolkit__WEBPACK_IMPORTED_MODULE_6__.WindowLocation.origin}${urlStrategy === 'path' ? '' : '#'}${basename != null ? basename : ''}${routes.hostedLoginRedirectUrl}`;
|
|
5078
5085
|
await actions.loadCustomLoginRoutes();
|
|
5079
5086
|
const customLoginSearchParam = (_store$auth$customLog2 = store.auth.customLoginState) == null ? void 0 : _store$auth$customLog2.customLoginSearchParams;
|
|
5080
5087
|
if (customLoginSearchParam) {
|
|
@@ -5102,11 +5109,11 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
5102
5109
|
console.error('Failed to exchangeOAuthTokens', e);
|
|
5103
5110
|
} finally {
|
|
5104
5111
|
const user = store.auth.user;
|
|
5105
|
-
const isStepUpFlow =
|
|
5106
|
-
|
|
5112
|
+
const isStepUpFlow = await _toolkit__WEBPACK_IMPORTED_MODULE_3__.LocalStorage.getItem(_StepUpState_consts__WEBPACK_IMPORTED_MODULE_7__.SHOULD_STEP_UP_KEY);
|
|
5113
|
+
await _toolkit__WEBPACK_IMPORTED_MODULE_3__.LocalStorage.removeItem(_StepUpState_consts__WEBPACK_IMPORTED_MODULE_7__.SHOULD_STEP_UP_KEY);
|
|
5107
5114
|
|
|
5108
5115
|
// when the user pause the step up flow we may still have the key in the local storage in hosted. Ignore it.
|
|
5109
|
-
if (isStepUpFlow && (0,
|
|
5116
|
+
if (isStepUpFlow && (0,_helpers__WEBPACK_IMPORTED_MODULE_8__.isSteppedUp)(user)) {
|
|
5110
5117
|
await actions.afterStepUpAuthNavigation();
|
|
5111
5118
|
} else {
|
|
5112
5119
|
await actions.afterAuthNavigation();
|
|
@@ -5137,33 +5144,36 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
5137
5144
|
/* harmony export */ });
|
|
5138
5145
|
/* 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");
|
|
5139
5146
|
/* 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");
|
|
5140
|
-
/* harmony import */ var
|
|
5141
|
-
/* harmony import */ var
|
|
5142
|
-
/* harmony import */ var
|
|
5143
|
-
/* harmony import */ var
|
|
5144
|
-
/* harmony import */ var
|
|
5145
|
-
/* harmony import */ var
|
|
5146
|
-
/* harmony import */ var
|
|
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
|
|
5147
|
+
/* harmony import */ var _afterAuthNavigation_actions__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./afterAuthNavigation.actions */ "../../dist/@frontegg/redux-store/auth/LoginState/actions/afterAuthNavigation.actions.js");
|
|
5148
|
+
/* harmony import */ var _handleVerifyMFAResponse_actions__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./handleVerifyMFAResponse.actions */ "../../dist/@frontegg/redux-store/auth/LoginState/actions/handleVerifyMFAResponse.actions.js");
|
|
5149
|
+
/* harmony import */ var _mfaRequiredState_actions__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./mfaRequiredState.actions */ "../../dist/@frontegg/redux-store/auth/LoginState/actions/mfaRequiredState.actions.js");
|
|
5150
|
+
/* harmony import */ var _mfaWithAuthenticator_actions__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ./mfaWithAuthenticator.actions */ "../../dist/@frontegg/redux-store/auth/LoginState/actions/mfaWithAuthenticator.actions.js");
|
|
5151
|
+
/* harmony import */ var _mfaWithEmailCode_actions__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ./mfaWithEmailCode.actions */ "../../dist/@frontegg/redux-store/auth/LoginState/actions/mfaWithEmailCode.actions.js");
|
|
5152
|
+
/* harmony import */ var _mfaWithSMS_actions__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ./mfaWithSMS.actions */ "../../dist/@frontegg/redux-store/auth/LoginState/actions/mfaWithSMS.actions.js");
|
|
5153
|
+
/* harmony import */ var _mfaWithWebAuthn_actions__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ./mfaWithWebAuthn.actions */ "../../dist/@frontegg/redux-store/auth/LoginState/actions/mfaWithWebAuthn.actions.js");
|
|
5154
|
+
/* harmony import */ var _interfaces__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../interfaces */ "../../dist/@frontegg/redux-store/auth/LoginState/interfaces.js");
|
|
5155
|
+
/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../helpers */ "../../dist/@frontegg/redux-store/helpers/common.js");
|
|
5156
|
+
/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../../helpers */ "../../dist/@frontegg/redux-store/helpers/handlers.js");
|
|
5157
|
+
/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../../../helpers */ "../../dist/@frontegg/redux-store/helpers/encoders.js");
|
|
5158
|
+
/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../../../helpers */ "../../dist/@frontegg/redux-store/helpers/converters.js");
|
|
5159
|
+
/* harmony import */ var _state__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../state */ "../../dist/@frontegg/redux-store/auth/LoginState/state.js");
|
|
5160
|
+
/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../helpers */ "../../dist/@frontegg/redux-store/auth/LoginState/helpers.js");
|
|
5154
5161
|
/* harmony import */ var _frontegg_rest_api__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @frontegg/rest-api */ "../../node_modules/@frontegg/rest-api/ContextHolder/index.js");
|
|
5155
|
-
/* harmony import */ var
|
|
5156
|
-
/* harmony import */ var
|
|
5157
|
-
/* harmony import */ var
|
|
5158
|
-
/* harmony import */ var
|
|
5159
|
-
/* harmony import */ var
|
|
5160
|
-
/* harmony import */ var
|
|
5161
|
-
/* harmony import */ var
|
|
5162
|
-
/* harmony import */ var
|
|
5163
|
-
/* harmony import */ var
|
|
5164
|
-
/* harmony import */ var
|
|
5165
|
-
/* harmony import */ var
|
|
5166
|
-
/* harmony import */ var
|
|
5162
|
+
/* harmony import */ var _frontegg_rest_api__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @frontegg/rest-api */ "../../node_modules/@frontegg/rest-api/auth/enums.js");
|
|
5163
|
+
/* harmony import */ var _frontegg_rest_api__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! @frontegg/rest-api */ "../../node_modules/@frontegg/rest-api/auth/interfaces.js");
|
|
5164
|
+
/* harmony import */ var _hostedLoginAuthorize_actions__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./hostedLoginAuthorize.actions */ "../../dist/@frontegg/redux-store/auth/LoginState/actions/hostedLoginAuthorize.actions.js");
|
|
5165
|
+
/* harmony import */ var _toolkit__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../toolkit */ "../../dist/@frontegg/redux-store/toolkit/LocalStorage.js");
|
|
5166
|
+
/* harmony import */ var _toolkit__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../toolkit */ "../../dist/@frontegg/redux-store/auth/Entitlements/helpers.js");
|
|
5167
|
+
/* harmony import */ var _toolkit__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../toolkit */ "../../dist/@frontegg/redux-store/toolkit/WindowLocation.js");
|
|
5168
|
+
/* harmony import */ var _toolkit__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../../toolkit */ "../../dist/@frontegg/redux-store/toolkit/FronteggNativeModule.js");
|
|
5169
|
+
/* harmony import */ var _toolkit__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../../toolkit */ "../../dist/@frontegg/redux-store/toolkit/SessionStorage.js");
|
|
5170
|
+
/* harmony import */ var _interfaces__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../interfaces */ "../../dist/@frontegg/redux-store/auth/interfaces.js");
|
|
5171
|
+
/* harmony import */ var _consts__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../consts */ "../../dist/@frontegg/redux-store/auth/LoginState/consts.js");
|
|
5172
|
+
/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../../../helpers */ "../../dist/@frontegg/redux-store/helpers/gtm.js");
|
|
5173
|
+
/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../helpers */ "../../dist/@frontegg/redux-store/auth/helpers.js");
|
|
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");
|
|
5167
5177
|
|
|
5168
5178
|
|
|
5169
5179
|
const _excluded = ["callback"],
|
|
@@ -5238,14 +5248,14 @@ const _excluded = ["callback"],
|
|
|
5238
5248
|
});
|
|
5239
5249
|
}
|
|
5240
5250
|
};
|
|
5241
|
-
const __shouldNevigateToRegisterQuickLogin = user => {
|
|
5251
|
+
const __shouldNevigateToRegisterQuickLogin = async user => {
|
|
5242
5252
|
var _ref;
|
|
5243
5253
|
const {
|
|
5244
5254
|
routes,
|
|
5245
5255
|
loginState
|
|
5246
5256
|
} = store.auth;
|
|
5247
|
-
const quickLoginToRegister = (_ref =
|
|
5248
|
-
return quickLoginToRegister &&
|
|
5257
|
+
const quickLoginToRegister = (_ref = await _toolkit__WEBPACK_IMPORTED_MODULE_3__.LocalStorage.getItem('register-quick-login')) != null ? _ref : loginState.quickLoginToRegister;
|
|
5258
|
+
return quickLoginToRegister && (await _toolkit__WEBPACK_IMPORTED_MODULE_3__.LocalStorage.getItem(`${user.id}-${quickLoginToRegister}`)) !== 'true' && !window.location.pathname.endsWith(routes.logoutUrl);
|
|
5249
5259
|
};
|
|
5250
5260
|
|
|
5251
5261
|
/** @private */
|
|
@@ -5261,7 +5271,7 @@ const _excluded = ["callback"],
|
|
|
5261
5271
|
tenants = [],
|
|
5262
5272
|
activeTenant
|
|
5263
5273
|
} = await api.auth.refreshTokenV3();
|
|
5264
|
-
if ((0,
|
|
5274
|
+
if ((0,_helpers__WEBPACK_IMPORTED_MODULE_4__.isMfaRequired)(user, store.root.appName)) {
|
|
5265
5275
|
const mfaRequiredState = await actions.getMfaRequiredState(user);
|
|
5266
5276
|
actions.setAuthState(mfaRequiredState);
|
|
5267
5277
|
onRedirectTo(routes.loginUrl, {
|
|
@@ -5270,10 +5280,10 @@ const _excluded = ["callback"],
|
|
|
5270
5280
|
} else {
|
|
5271
5281
|
var _ref2;
|
|
5272
5282
|
if (user.id) {
|
|
5273
|
-
|
|
5283
|
+
await _toolkit__WEBPACK_IMPORTED_MODULE_3__.LocalStorage.setItem('userId', user.id);
|
|
5274
5284
|
}
|
|
5275
|
-
const quickLoginToRegister = (_ref2 =
|
|
5276
|
-
const shouldNavigateToRegisterQuickLogin = __shouldNevigateToRegisterQuickLogin(user);
|
|
5285
|
+
const quickLoginToRegister = (_ref2 = await _toolkit__WEBPACK_IMPORTED_MODULE_3__.LocalStorage.getItem('register-quick-login')) != null ? _ref2 : loginState.quickLoginToRegister;
|
|
5286
|
+
const shouldNavigateToRegisterQuickLogin = await __shouldNevigateToRegisterQuickLogin(user);
|
|
5277
5287
|
const updatedUser = await __handleUnnecessaryEntitlementsUpdate(user);
|
|
5278
5288
|
actions.afterAuthenticationStateUpdate({
|
|
5279
5289
|
user: updatedUser,
|
|
@@ -5282,7 +5292,7 @@ const _excluded = ["callback"],
|
|
|
5282
5292
|
}, {
|
|
5283
5293
|
loginState: (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__["default"])({}, loginState, {
|
|
5284
5294
|
quickLoginToRegister,
|
|
5285
|
-
flow: shouldNavigateToRegisterQuickLogin ?
|
|
5295
|
+
flow: shouldNavigateToRegisterQuickLogin ? _interfaces__WEBPACK_IMPORTED_MODULE_5__.LoginFlow.RegisterQuickLogin : _interfaces__WEBPACK_IMPORTED_MODULE_5__.LoginFlow.Login
|
|
5286
5296
|
}),
|
|
5287
5297
|
isAuthenticated: true
|
|
5288
5298
|
});
|
|
@@ -5321,7 +5331,7 @@ const _excluded = ["callback"],
|
|
|
5321
5331
|
var _store$auth$user;
|
|
5322
5332
|
// @ts-ignore TODO: fix entitlements state type
|
|
5323
5333
|
const oldEntitlements = (_store$auth$user = store.auth.user) == null ? void 0 : _store$auth$user.entitlements;
|
|
5324
|
-
if ((0,
|
|
5334
|
+
if ((0,_toolkit__WEBPACK_IMPORTED_MODULE_6__.isEntitlementsDeeplyEqual)(oldEntitlements, updatedUser == null ? void 0 : updatedUser.entitlements)) {
|
|
5325
5335
|
// set the previous entitlemenets object
|
|
5326
5336
|
return (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__["default"])({}, updatedUser, {
|
|
5327
5337
|
entitlements: oldEntitlements
|
|
@@ -5332,8 +5342,7 @@ const _excluded = ["callback"],
|
|
|
5332
5342
|
|
|
5333
5343
|
/** @private */
|
|
5334
5344
|
const __handleRedirectRefreshToken = async shouldNavigateToRegisterQuickLogin => {
|
|
5335
|
-
|
|
5336
|
-
const url = new URL((_window = window) == null ? void 0 : _window.location.href);
|
|
5345
|
+
const url = new URL(_toolkit__WEBPACK_IMPORTED_MODULE_7__.WindowLocation.href);
|
|
5337
5346
|
const {
|
|
5338
5347
|
routes,
|
|
5339
5348
|
loginState,
|
|
@@ -5346,8 +5355,8 @@ const _excluded = ["callback"],
|
|
|
5346
5355
|
}
|
|
5347
5356
|
if (shouldNavigateToRegisterQuickLogin) {
|
|
5348
5357
|
onRedirectTo(routes.loginUrl);
|
|
5349
|
-
} else if (redirectRoutes.some(url => url &&
|
|
5350
|
-
if (loginState.isNewUser && routes.signUpSuccessUrl && routes.socialLoginCallbackUrl ===
|
|
5358
|
+
} else if (redirectRoutes.some(url => url && _toolkit__WEBPACK_IMPORTED_MODULE_7__.WindowLocation.pathname.endsWith(url))) {
|
|
5359
|
+
if (loginState.isNewUser && routes.signUpSuccessUrl && routes.socialLoginCallbackUrl === _toolkit__WEBPACK_IMPORTED_MODULE_7__.WindowLocation.pathname) {
|
|
5351
5360
|
onRedirectTo(routes.signUpSuccessUrl, {
|
|
5352
5361
|
refresh: routes.signUpSuccessUrl.startsWith('http')
|
|
5353
5362
|
});
|
|
@@ -5402,7 +5411,7 @@ const _excluded = ["callback"],
|
|
|
5402
5411
|
onRedirectTo,
|
|
5403
5412
|
routes
|
|
5404
5413
|
} = store.auth;
|
|
5405
|
-
if ((0,
|
|
5414
|
+
if ((0,_helpers__WEBPACK_IMPORTED_MODULE_4__.isMfaRequired)(user, store.root.appName)) {
|
|
5406
5415
|
const mfaRequiredState = await actions.getMfaRequiredState(user);
|
|
5407
5416
|
actions.setAuthState(mfaRequiredState);
|
|
5408
5417
|
onRedirectTo(routes.loginUrl, {
|
|
@@ -5414,7 +5423,7 @@ const _excluded = ["callback"],
|
|
|
5414
5423
|
Object.assign(store.auth.loginState, state);
|
|
5415
5424
|
};
|
|
5416
5425
|
const resetLoginState = () => {
|
|
5417
|
-
store.auth.loginState = (0,
|
|
5426
|
+
store.auth.loginState = (0,_helpers__WEBPACK_IMPORTED_MODULE_8__.deepClone)(_state__WEBPACK_IMPORTED_MODULE_9__.initialState);
|
|
5418
5427
|
};
|
|
5419
5428
|
const requestAuthorize = async firstTime => {
|
|
5420
5429
|
const calls = [];
|
|
@@ -5464,26 +5473,26 @@ const _excluded = ["callback"],
|
|
|
5464
5473
|
const publicPolicy = store.auth.securityPolicyState.publicPolicy.policy;
|
|
5465
5474
|
if (!(publicPolicy != null && publicPolicy.authStrategy)) {
|
|
5466
5475
|
actions.setLoginState({
|
|
5467
|
-
step:
|
|
5476
|
+
step: _interfaces__WEBPACK_IMPORTED_MODULE_5__.LoginStep.loginWithPassword,
|
|
5468
5477
|
loading: false
|
|
5469
5478
|
});
|
|
5470
5479
|
callback == null ? void 0 : callback();
|
|
5471
5480
|
return;
|
|
5472
5481
|
}
|
|
5473
|
-
if ((publicPolicy == null ? void 0 : publicPolicy.authStrategy) ===
|
|
5482
|
+
if ((publicPolicy == null ? void 0 : publicPolicy.authStrategy) === _frontegg_rest_api__WEBPACK_IMPORTED_MODULE_10__.AuthStrategyEnum.EmailAndPassword) {
|
|
5474
5483
|
actions.setLoginState({
|
|
5475
|
-
step:
|
|
5484
|
+
step: _interfaces__WEBPACK_IMPORTED_MODULE_5__.LoginStep.loginWithPassword,
|
|
5476
5485
|
loading: false
|
|
5477
5486
|
});
|
|
5478
5487
|
callback == null ? void 0 : callback();
|
|
5479
|
-
} else if ([
|
|
5488
|
+
} else if ([_frontegg_rest_api__WEBPACK_IMPORTED_MODULE_10__.AuthStrategyEnum.MagicLink, _frontegg_rest_api__WEBPACK_IMPORTED_MODULE_10__.AuthStrategyEnum.Code, _frontegg_rest_api__WEBPACK_IMPORTED_MODULE_10__.AuthStrategyEnum.SmsCode].includes(publicPolicy == null ? void 0 : publicPolicy.authStrategy)) {
|
|
5480
5489
|
await actions.passwordlessPreLogin((0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__["default"])({}, body, {
|
|
5481
5490
|
type: publicPolicy == null ? void 0 : publicPolicy.authStrategy,
|
|
5482
5491
|
callback
|
|
5483
5492
|
}));
|
|
5484
5493
|
} else {
|
|
5485
5494
|
actions.setLoginState({
|
|
5486
|
-
step:
|
|
5495
|
+
step: _interfaces__WEBPACK_IMPORTED_MODULE_5__.LoginStep.loginWithPassword,
|
|
5487
5496
|
loading: false
|
|
5488
5497
|
});
|
|
5489
5498
|
callback == null ? void 0 : callback();
|
|
@@ -5501,7 +5510,7 @@ const _excluded = ["callback"],
|
|
|
5501
5510
|
});
|
|
5502
5511
|
try {
|
|
5503
5512
|
const onRedirectTo = store.auth.onRedirectTo;
|
|
5504
|
-
const tenantId = (0,
|
|
5513
|
+
const tenantId = (0,_helpers__WEBPACK_IMPORTED_MODULE_11__.getSearchParam)(_helpers__WEBPACK_IMPORTED_MODULE_11__.TENANT_ID_PARAM_KEY);
|
|
5505
5514
|
const preLoginResult = await api.auth.preLoginV2({
|
|
5506
5515
|
email,
|
|
5507
5516
|
tenantId
|
|
@@ -5512,21 +5521,21 @@ const _excluded = ["callback"],
|
|
|
5512
5521
|
} = preLoginResult != null ? preLoginResult : {};
|
|
5513
5522
|
if (address) {
|
|
5514
5523
|
let ssoRedirectUrl = address;
|
|
5515
|
-
if (idpType ===
|
|
5524
|
+
if (idpType === _SSOState_interfaces__WEBPACK_IMPORTED_MODULE_12__.SamlVendors.Oidc && !ssoRedirectUrl.includes('redirect_uri')) {
|
|
5516
5525
|
const {
|
|
5517
5526
|
oidcRedirectUrl
|
|
5518
5527
|
} = store.auth.routes;
|
|
5519
|
-
ssoRedirectUrl += `&redirect_uri=${
|
|
5528
|
+
ssoRedirectUrl += `&redirect_uri=${_toolkit__WEBPACK_IMPORTED_MODULE_7__.WindowLocation.origin}${oidcRedirectUrl}`;
|
|
5520
5529
|
}
|
|
5521
|
-
if (
|
|
5522
|
-
|
|
5530
|
+
if (_toolkit__WEBPACK_IMPORTED_MODULE_13__["default"].isLoginWithSSOAvailable()) {
|
|
5531
|
+
_toolkit__WEBPACK_IMPORTED_MODULE_13__["default"].loginWithSSO(email);
|
|
5523
5532
|
setLoginState({
|
|
5524
5533
|
loading: false
|
|
5525
5534
|
});
|
|
5526
5535
|
callback == null ? void 0 : callback();
|
|
5527
5536
|
} else {
|
|
5528
5537
|
setLoginState({
|
|
5529
|
-
step:
|
|
5538
|
+
step: _interfaces__WEBPACK_IMPORTED_MODULE_5__.LoginStep.redirectToSSO,
|
|
5530
5539
|
loading: false,
|
|
5531
5540
|
ssoRedirectUrl
|
|
5532
5541
|
});
|
|
@@ -5573,7 +5582,7 @@ const _excluded = ["callback"],
|
|
|
5573
5582
|
onRedirectTo(routes.authenticatedUrl);
|
|
5574
5583
|
}, 1000);
|
|
5575
5584
|
setLoginState({
|
|
5576
|
-
step:
|
|
5585
|
+
step: _interfaces__WEBPACK_IMPORTED_MODULE_5__.LoginStep.loginWithSSOFailed,
|
|
5577
5586
|
loading: false
|
|
5578
5587
|
});
|
|
5579
5588
|
}
|
|
@@ -5604,7 +5613,7 @@ const _excluded = ["callback"],
|
|
|
5604
5613
|
onRedirectTo,
|
|
5605
5614
|
routes
|
|
5606
5615
|
} = store.auth;
|
|
5607
|
-
if ((0,
|
|
5616
|
+
if ((0,_helpers__WEBPACK_IMPORTED_MODULE_4__.isMfaRequired)(user, store.root.appName)) {
|
|
5608
5617
|
const mfaRequiredState = await actions.getMfaRequiredState(user);
|
|
5609
5618
|
actions.setAuthState(mfaRequiredState);
|
|
5610
5619
|
onRedirectTo(routes.loginUrl, {
|
|
@@ -5614,7 +5623,7 @@ const _excluded = ["callback"],
|
|
|
5614
5623
|
const loginState = store.auth.loginState;
|
|
5615
5624
|
const isAuthenticated = !!user.accessToken;
|
|
5616
5625
|
if (user.id) {
|
|
5617
|
-
|
|
5626
|
+
await _toolkit__WEBPACK_IMPORTED_MODULE_3__.LocalStorage.setItem('userId', user.id);
|
|
5618
5627
|
}
|
|
5619
5628
|
actions.afterAuthenticationStateUpdate({
|
|
5620
5629
|
user,
|
|
@@ -5628,7 +5637,7 @@ const _excluded = ["callback"],
|
|
|
5628
5637
|
loading: false,
|
|
5629
5638
|
error: undefined,
|
|
5630
5639
|
mfaToken: user.mfaToken,
|
|
5631
|
-
step: loginState.flow ===
|
|
5640
|
+
step: loginState.flow === _interfaces__WEBPACK_IMPORTED_MODULE_5__.LoginFlow.Login ? _interfaces__WEBPACK_IMPORTED_MODULE_5__.LoginStep.success : loginState.step,
|
|
5632
5641
|
tenants,
|
|
5633
5642
|
tenantsLoading: true,
|
|
5634
5643
|
isBreachedPassword: user.isBreachedPassword
|
|
@@ -5636,10 +5645,10 @@ const _excluded = ["callback"],
|
|
|
5636
5645
|
isAuthenticated
|
|
5637
5646
|
});
|
|
5638
5647
|
const [securityCenterLoginFlows] = await actions.getFeatureFlags(['security-center-show-login-flows']);
|
|
5639
|
-
if (loginState.flow ===
|
|
5648
|
+
if (loginState.flow === _interfaces__WEBPACK_IMPORTED_MODULE_5__.LoginFlow.Login) {
|
|
5640
5649
|
if (securityCenterLoginFlows && user.isBreachedPassword && !isAuthenticated) {
|
|
5641
5650
|
setLoginState({
|
|
5642
|
-
step:
|
|
5651
|
+
step: _interfaces__WEBPACK_IMPORTED_MODULE_5__.LoginStep.breachedPassword,
|
|
5643
5652
|
loading: false
|
|
5644
5653
|
});
|
|
5645
5654
|
} else {
|
|
@@ -5647,7 +5656,7 @@ const _excluded = ["callback"],
|
|
|
5647
5656
|
const shouldShowPrompt = await actions.__shouldShowPromptPasskeys();
|
|
5648
5657
|
if (shouldShowPrompt) {
|
|
5649
5658
|
setLoginState({
|
|
5650
|
-
step:
|
|
5659
|
+
step: _interfaces__WEBPACK_IMPORTED_MODULE_5__.LoginStep.promptPasskeys,
|
|
5651
5660
|
loading: false
|
|
5652
5661
|
});
|
|
5653
5662
|
onRedirectTo(routes.loginUrl, {
|
|
@@ -5662,7 +5671,7 @@ const _excluded = ["callback"],
|
|
|
5662
5671
|
}
|
|
5663
5672
|
|
|
5664
5673
|
// TODO: extract item name to constants
|
|
5665
|
-
|
|
5674
|
+
await _toolkit__WEBPACK_IMPORTED_MODULE_3__.LocalStorage.removeItem('register-quick-login');
|
|
5666
5675
|
callback == null ? void 0 : callback(true);
|
|
5667
5676
|
} catch (e) {
|
|
5668
5677
|
contextHolder.setAccessToken(null);
|
|
@@ -5670,7 +5679,7 @@ const _excluded = ["callback"],
|
|
|
5670
5679
|
callback == null ? void 0 : callback(false, e);
|
|
5671
5680
|
setLoginState({
|
|
5672
5681
|
email,
|
|
5673
|
-
error: (0,
|
|
5682
|
+
error: (0,_helpers__WEBPACK_IMPORTED_MODULE_14__.errorHandler)(e),
|
|
5674
5683
|
loading: false
|
|
5675
5684
|
});
|
|
5676
5685
|
}
|
|
@@ -5690,7 +5699,7 @@ const _excluded = ["callback"],
|
|
|
5690
5699
|
/* empty */
|
|
5691
5700
|
}
|
|
5692
5701
|
if (contextHolder.isSessionPerTenantEnabled()) {
|
|
5693
|
-
(
|
|
5702
|
+
await _toolkit__WEBPACK_IMPORTED_MODULE_15__.SessionStorage.removeItem(_frontegg_rest_api__WEBPACK_IMPORTED_MODULE_16__.FRONTEGG_SEPARATE_TABS_BY_TENANT);
|
|
5694
5703
|
}
|
|
5695
5704
|
actions.resetAuthState();
|
|
5696
5705
|
await actions.requestAuthorize(true);
|
|
@@ -5704,7 +5713,7 @@ const _excluded = ["callback"],
|
|
|
5704
5713
|
/* empty */
|
|
5705
5714
|
}
|
|
5706
5715
|
if (contextHolder.isSessionPerTenantEnabled()) {
|
|
5707
|
-
(
|
|
5716
|
+
await _toolkit__WEBPACK_IMPORTED_MODULE_15__.SessionStorage.removeItem(_frontegg_rest_api__WEBPACK_IMPORTED_MODULE_16__.FRONTEGG_SEPARATE_TABS_BY_TENANT);
|
|
5708
5717
|
}
|
|
5709
5718
|
setTimeout(() => {
|
|
5710
5719
|
var _payload$callback;
|
|
@@ -5721,7 +5730,7 @@ const _excluded = ["callback"],
|
|
|
5721
5730
|
setLoginState({
|
|
5722
5731
|
loading: false,
|
|
5723
5732
|
error: undefined,
|
|
5724
|
-
step:
|
|
5733
|
+
step: _interfaces__WEBPACK_IMPORTED_MODULE_5__.LoginStep.preLogin
|
|
5725
5734
|
});
|
|
5726
5735
|
actions.setAuthState({
|
|
5727
5736
|
user: undefined,
|
|
@@ -5731,7 +5740,7 @@ const _excluded = ["callback"],
|
|
|
5731
5740
|
} catch (e) {
|
|
5732
5741
|
var _payload$callback3;
|
|
5733
5742
|
setLoginState({
|
|
5734
|
-
error: (0,
|
|
5743
|
+
error: (0,_helpers__WEBPACK_IMPORTED_MODULE_14__.errorHandler)(e),
|
|
5735
5744
|
loading: false
|
|
5736
5745
|
});
|
|
5737
5746
|
(_payload$callback3 = payload.callback) == null ? void 0 : _payload$callback3.call(payload, false, e);
|
|
@@ -5750,10 +5759,10 @@ const _excluded = ["callback"],
|
|
|
5750
5759
|
// TODO: fix @frontegg/rest-api return value
|
|
5751
5760
|
// @ts-ignore
|
|
5752
5761
|
const preloginRes = await api.auth.passwordlessPreLogin((0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__["default"])({}, payload, {
|
|
5753
|
-
type:
|
|
5762
|
+
type: _frontegg_rest_api__WEBPACK_IMPORTED_MODULE_10__.AuthStrategyEnum.SmsCode
|
|
5754
5763
|
}));
|
|
5755
5764
|
setLoginState({
|
|
5756
|
-
step:
|
|
5765
|
+
step: _interfaces__WEBPACK_IMPORTED_MODULE_5__.LoginStep.loginWithQuickSmsOtc,
|
|
5757
5766
|
loading: false,
|
|
5758
5767
|
phoneNumber: preloginRes == null ? void 0 : preloginRes.phoneNumber,
|
|
5759
5768
|
error: undefined
|
|
@@ -5761,7 +5770,7 @@ const _excluded = ["callback"],
|
|
|
5761
5770
|
callback == null ? void 0 : callback(true);
|
|
5762
5771
|
} catch (e) {
|
|
5763
5772
|
setLoginState({
|
|
5764
|
-
error: (0,
|
|
5773
|
+
error: (0,_helpers__WEBPACK_IMPORTED_MODULE_14__.errorHandler)(e),
|
|
5765
5774
|
loading: false
|
|
5766
5775
|
});
|
|
5767
5776
|
callback == null ? void 0 : callback(false, e);
|
|
@@ -5781,13 +5790,13 @@ const _excluded = ["callback"],
|
|
|
5781
5790
|
phoneNumber: payload.phoneNumber,
|
|
5782
5791
|
loading: false,
|
|
5783
5792
|
changePhoneId: changePhoneRes.changePhoneId,
|
|
5784
|
-
step:
|
|
5793
|
+
step: _interfaces__WEBPACK_IMPORTED_MODULE_5__.LoginStep.loginWithQuickSmsOtc,
|
|
5785
5794
|
error: undefined
|
|
5786
5795
|
});
|
|
5787
5796
|
callback == null ? void 0 : callback(true);
|
|
5788
5797
|
} catch (e) {
|
|
5789
5798
|
setLoginState({
|
|
5790
|
-
error: (0,
|
|
5799
|
+
error: (0,_helpers__WEBPACK_IMPORTED_MODULE_14__.errorHandler)(e),
|
|
5791
5800
|
loading: false
|
|
5792
5801
|
});
|
|
5793
5802
|
}
|
|
@@ -5808,7 +5817,7 @@ const _excluded = ["callback"],
|
|
|
5808
5817
|
callback == null ? void 0 : callback(true);
|
|
5809
5818
|
} catch (e) {
|
|
5810
5819
|
setLoginState({
|
|
5811
|
-
error: (0,
|
|
5820
|
+
error: (0,_helpers__WEBPACK_IMPORTED_MODULE_14__.errorHandler)(e),
|
|
5812
5821
|
loading: false
|
|
5813
5822
|
});
|
|
5814
5823
|
}
|
|
@@ -5823,14 +5832,14 @@ const _excluded = ["callback"],
|
|
|
5823
5832
|
loading: true
|
|
5824
5833
|
});
|
|
5825
5834
|
let email;
|
|
5826
|
-
if ((0,
|
|
5835
|
+
if ((0,_helpers__WEBPACK_IMPORTED_MODULE_11__.isEmailPayload)(payload)) {
|
|
5827
5836
|
email = payload.email;
|
|
5828
5837
|
}
|
|
5829
5838
|
// TODO: [Typescript 4.8] fix @frontegg/rest-api return value
|
|
5830
5839
|
// @ts-ignore
|
|
5831
5840
|
const preloginRes = await api.auth.passwordlessPreLogin(payload);
|
|
5832
5841
|
// @ts-ignore
|
|
5833
|
-
const step =
|
|
5842
|
+
const step = _consts__WEBPACK_IMPORTED_MODULE_17__.authStrategyLoginStepMap[payload.type];
|
|
5834
5843
|
setLoginState({
|
|
5835
5844
|
step,
|
|
5836
5845
|
loading: false,
|
|
@@ -5841,7 +5850,7 @@ const _excluded = ["callback"],
|
|
|
5841
5850
|
callback == null ? void 0 : callback();
|
|
5842
5851
|
} catch (e) {
|
|
5843
5852
|
setLoginState({
|
|
5844
|
-
error: (0,
|
|
5853
|
+
error: (0,_helpers__WEBPACK_IMPORTED_MODULE_14__.errorHandler)(e),
|
|
5845
5854
|
loading: false
|
|
5846
5855
|
});
|
|
5847
5856
|
callback == null ? void 0 : callback(null, e);
|
|
@@ -5866,7 +5875,7 @@ const _excluded = ["callback"],
|
|
|
5866
5875
|
routes,
|
|
5867
5876
|
onRedirectTo
|
|
5868
5877
|
} = store.auth;
|
|
5869
|
-
if ((0,
|
|
5878
|
+
if ((0,_helpers__WEBPACK_IMPORTED_MODULE_4__.isMfaRequired)(user, store.root.appName)) {
|
|
5870
5879
|
const mfaRequiredState = await actions.getMfaRequiredState(user);
|
|
5871
5880
|
actions.setAuthState(mfaRequiredState);
|
|
5872
5881
|
onRedirectTo(routes.loginUrl, {
|
|
@@ -5878,17 +5887,17 @@ const _excluded = ["callback"],
|
|
|
5878
5887
|
var _events$userVerified;
|
|
5879
5888
|
const userVerifiedPayload = {
|
|
5880
5889
|
email: user.email,
|
|
5881
|
-
origin:
|
|
5890
|
+
origin: _interfaces__WEBPACK_IMPORTED_MODULE_18__.UserVeirifedOriginTypes.PASSWORDLESS,
|
|
5882
5891
|
id: user.id,
|
|
5883
5892
|
tenantId: user.tenantId,
|
|
5884
5893
|
createdAt: new Date(),
|
|
5885
5894
|
name: user.name
|
|
5886
5895
|
};
|
|
5887
5896
|
events == null ? void 0 : (_events$userVerified = events.userVerified) == null ? void 0 : _events$userVerified.call(events, userVerifiedPayload);
|
|
5888
|
-
(0,
|
|
5897
|
+
(0,_helpers__WEBPACK_IMPORTED_MODULE_19__.reportGTMEvent)(_helpers__WEBPACK_IMPORTED_MODULE_19__.GTMEventAction.USER_VERIFIED, userVerifiedPayload);
|
|
5889
5898
|
}
|
|
5890
5899
|
if (user.id) {
|
|
5891
|
-
|
|
5900
|
+
await _toolkit__WEBPACK_IMPORTED_MODULE_3__.LocalStorage.setItem('userId', user.id);
|
|
5892
5901
|
}
|
|
5893
5902
|
actions.afterAuthenticationStateUpdate({
|
|
5894
5903
|
user,
|
|
@@ -5901,11 +5910,11 @@ const _excluded = ["callback"],
|
|
|
5901
5910
|
actions.setAuthState({
|
|
5902
5911
|
isLoading: false
|
|
5903
5912
|
});
|
|
5904
|
-
if (loginState.flow ===
|
|
5913
|
+
if (loginState.flow === _interfaces__WEBPACK_IMPORTED_MODULE_5__.LoginFlow.Login) {
|
|
5905
5914
|
const shouldShowPrompt = await actions.__shouldShowPromptPasskeys();
|
|
5906
5915
|
if (shouldShowPrompt) {
|
|
5907
5916
|
actions.setLoginState({
|
|
5908
|
-
step:
|
|
5917
|
+
step: _interfaces__WEBPACK_IMPORTED_MODULE_5__.LoginStep.promptPasskeys,
|
|
5909
5918
|
loading: false
|
|
5910
5919
|
});
|
|
5911
5920
|
onRedirectTo(routes.loginUrl, {
|
|
@@ -5922,12 +5931,12 @@ const _excluded = ["callback"],
|
|
|
5922
5931
|
preserveQueryParams: true
|
|
5923
5932
|
});
|
|
5924
5933
|
}
|
|
5925
|
-
|
|
5934
|
+
await _toolkit__WEBPACK_IMPORTED_MODULE_3__.LocalStorage.removeItem('register-quick-login');
|
|
5926
5935
|
callback == null ? void 0 : callback(true);
|
|
5927
5936
|
}
|
|
5928
5937
|
} catch (e) {
|
|
5929
5938
|
setLoginState({
|
|
5930
|
-
error: (0,
|
|
5939
|
+
error: (0,_helpers__WEBPACK_IMPORTED_MODULE_14__.errorHandler)(e, 'Failed to authenticate')
|
|
5931
5940
|
});
|
|
5932
5941
|
callback == null ? void 0 : callback(null, e);
|
|
5933
5942
|
} finally {
|
|
@@ -5951,7 +5960,7 @@ const _excluded = ["callback"],
|
|
|
5951
5960
|
});
|
|
5952
5961
|
} catch (e) {
|
|
5953
5962
|
setLoginState({
|
|
5954
|
-
inviteTokenError: (0,
|
|
5963
|
+
inviteTokenError: (0,_helpers__WEBPACK_IMPORTED_MODULE_14__.errorHandler)(e, `We couldn't verify your invitation`)
|
|
5955
5964
|
});
|
|
5956
5965
|
} finally {
|
|
5957
5966
|
setLoginState({
|
|
@@ -5977,9 +5986,9 @@ const _excluded = ["callback"],
|
|
|
5977
5986
|
const {
|
|
5978
5987
|
options
|
|
5979
5988
|
} = await api.auth.webAuthnPreLogin(body);
|
|
5980
|
-
options.challenge = (0,
|
|
5989
|
+
options.challenge = (0,_helpers__WEBPACK_IMPORTED_MODULE_20__.base64urlDecode)(options.challenge);
|
|
5981
5990
|
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, {
|
|
5982
|
-
id: (0,
|
|
5991
|
+
id: (0,_helpers__WEBPACK_IMPORTED_MODULE_20__.base64urlDecode)(credentials.id)
|
|
5983
5992
|
}));
|
|
5984
5993
|
setLoginState({
|
|
5985
5994
|
error: undefined
|
|
@@ -5987,7 +5996,7 @@ const _excluded = ["callback"],
|
|
|
5987
5996
|
callback == null ? void 0 : callback(options);
|
|
5988
5997
|
} catch (e) {
|
|
5989
5998
|
setLoginState({
|
|
5990
|
-
error: (0,
|
|
5999
|
+
error: (0,_helpers__WEBPACK_IMPORTED_MODULE_14__.errorHandler)(e)
|
|
5991
6000
|
});
|
|
5992
6001
|
callback == null ? void 0 : callback(null);
|
|
5993
6002
|
} finally {
|
|
@@ -6012,7 +6021,7 @@ const _excluded = ["callback"],
|
|
|
6012
6021
|
setLoginState({
|
|
6013
6022
|
loading: true
|
|
6014
6023
|
});
|
|
6015
|
-
const publicKey = (0,
|
|
6024
|
+
const publicKey = (0,_helpers__WEBPACK_IMPORTED_MODULE_21__.publicKeyCredentialToJSON)(body.publicKey);
|
|
6016
6025
|
const _await$api$auth$webAu = await api.auth.webAuthnPostLoginV2((0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__["default"])({}, publicKey, {
|
|
6017
6026
|
response: (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__["default"])({}, publicKey.response, {
|
|
6018
6027
|
userHandle: (_publicKey$response$u = publicKey.response.userHandle) != null ? _publicKey$response$u : undefined
|
|
@@ -6024,7 +6033,7 @@ const _excluded = ["callback"],
|
|
|
6024
6033
|
user
|
|
6025
6034
|
} = _await$api$auth$webAu,
|
|
6026
6035
|
rest = (0,_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__["default"])(_await$api$auth$webAu, _excluded9);
|
|
6027
|
-
if ((0,
|
|
6036
|
+
if ((0,_helpers__WEBPACK_IMPORTED_MODULE_4__.isMfaRequired)(user, store.root.appName)) {
|
|
6028
6037
|
const {
|
|
6029
6038
|
routes,
|
|
6030
6039
|
onRedirectTo
|
|
@@ -6036,7 +6045,7 @@ const _excluded = ["callback"],
|
|
|
6036
6045
|
});
|
|
6037
6046
|
} else {
|
|
6038
6047
|
if (user.id) {
|
|
6039
|
-
|
|
6048
|
+
await _toolkit__WEBPACK_IMPORTED_MODULE_3__.LocalStorage.setItem('userId', user.id);
|
|
6040
6049
|
}
|
|
6041
6050
|
actions.afterAuthenticationStateUpdate((0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__["default"])({
|
|
6042
6051
|
user
|
|
@@ -6053,7 +6062,7 @@ const _excluded = ["callback"],
|
|
|
6053
6062
|
// callback?.(true);
|
|
6054
6063
|
} catch (e) {
|
|
6055
6064
|
setLoginState({
|
|
6056
|
-
error: (0,
|
|
6065
|
+
error: (0,_helpers__WEBPACK_IMPORTED_MODULE_14__.errorHandler)(e)
|
|
6057
6066
|
});
|
|
6058
6067
|
callback == null ? void 0 : callback(null);
|
|
6059
6068
|
} finally {
|
|
@@ -6078,13 +6087,13 @@ const _excluded = ["callback"],
|
|
|
6078
6087
|
const {
|
|
6079
6088
|
options
|
|
6080
6089
|
} = await api.auth.webAuthnCreateNewDeviceSession();
|
|
6081
|
-
options.user.id = (0,
|
|
6082
|
-
options.challenge = (0,
|
|
6090
|
+
options.user.id = (0,_helpers__WEBPACK_IMPORTED_MODULE_20__.base64urlDecode)(options.user.id);
|
|
6091
|
+
options.challenge = (0,_helpers__WEBPACK_IMPORTED_MODULE_20__.base64urlDecode)(options.challenge);
|
|
6083
6092
|
options.excludeCredentials = [];
|
|
6084
6093
|
callback == null ? void 0 : callback(options);
|
|
6085
6094
|
} catch (e) {
|
|
6086
6095
|
setLoginState({
|
|
6087
|
-
error: (0,
|
|
6096
|
+
error: (0,_helpers__WEBPACK_IMPORTED_MODULE_14__.errorHandler)(e)
|
|
6088
6097
|
});
|
|
6089
6098
|
callback == null ? void 0 : callback(null);
|
|
6090
6099
|
} finally {
|
|
@@ -6102,8 +6111,8 @@ const _excluded = ["callback"],
|
|
|
6102
6111
|
setLoginState({
|
|
6103
6112
|
loading: true
|
|
6104
6113
|
});
|
|
6105
|
-
const publicKey = (0,
|
|
6106
|
-
const deviceType = (publicKey == null ? void 0 : publicKey.authenticatorAttachment) === 'platform' ?
|
|
6114
|
+
const publicKey = (0,_helpers__WEBPACK_IMPORTED_MODULE_21__.publicKeyCredentialToJSON)(body.publicKey);
|
|
6115
|
+
const deviceType = (publicKey == null ? void 0 : publicKey.authenticatorAttachment) === 'platform' ? _frontegg_rest_api__WEBPACK_IMPORTED_MODULE_22__.WebAuthnDeviceType.Platform : _frontegg_rest_api__WEBPACK_IMPORTED_MODULE_22__.WebAuthnDeviceType.CrossPlatform;
|
|
6107
6116
|
await api.auth.verifyNewDeviceSession({
|
|
6108
6117
|
id: publicKey.id,
|
|
6109
6118
|
response: publicKey.response,
|
|
@@ -6112,7 +6121,7 @@ const _excluded = ["callback"],
|
|
|
6112
6121
|
callback == null ? void 0 : callback(true);
|
|
6113
6122
|
} catch (e) {
|
|
6114
6123
|
setLoginState({
|
|
6115
|
-
error: (0,
|
|
6124
|
+
error: (0,_helpers__WEBPACK_IMPORTED_MODULE_14__.errorHandler)(e)
|
|
6116
6125
|
});
|
|
6117
6126
|
callback == null ? void 0 : callback(null);
|
|
6118
6127
|
} finally {
|
|
@@ -6149,12 +6158,12 @@ const _excluded = ["callback"],
|
|
|
6149
6158
|
var _data$options$exclude;
|
|
6150
6159
|
const data = await api.auth.preEnrollMFAWebAuthnForLogin(payload);
|
|
6151
6160
|
const options = (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__["default"])({}, data.options, {
|
|
6152
|
-
challenge: (0,
|
|
6161
|
+
challenge: (0,_helpers__WEBPACK_IMPORTED_MODULE_20__.base64urlDecode)(data.options.challenge),
|
|
6153
6162
|
user: (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__["default"])({}, data.options.user, {
|
|
6154
|
-
id: (0,
|
|
6163
|
+
id: (0,_helpers__WEBPACK_IMPORTED_MODULE_20__.base64urlDecode)(data.options.user.id)
|
|
6155
6164
|
}),
|
|
6156
6165
|
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, {
|
|
6157
|
-
id: (0,
|
|
6166
|
+
id: (0,_helpers__WEBPACK_IMPORTED_MODULE_20__.base64urlDecode)(credentials.id)
|
|
6158
6167
|
}))
|
|
6159
6168
|
});
|
|
6160
6169
|
setLoginState({
|
|
@@ -6167,7 +6176,7 @@ const _excluded = ["callback"],
|
|
|
6167
6176
|
} catch (e) {
|
|
6168
6177
|
setLoginState({
|
|
6169
6178
|
loading: false,
|
|
6170
|
-
error: (0,
|
|
6179
|
+
error: (0,_helpers__WEBPACK_IMPORTED_MODULE_14__.errorHandler)(e)
|
|
6171
6180
|
});
|
|
6172
6181
|
callback == null ? void 0 : callback(null);
|
|
6173
6182
|
}
|
|
@@ -6181,7 +6190,7 @@ const _excluded = ["callback"],
|
|
|
6181
6190
|
loading: true
|
|
6182
6191
|
});
|
|
6183
6192
|
try {
|
|
6184
|
-
const publicKey = (0,
|
|
6193
|
+
const publicKey = (0,_helpers__WEBPACK_IMPORTED_MODULE_21__.publicKeyCredentialToJSON)(payload.publicKey);
|
|
6185
6194
|
const data = await api.auth.enrollMFAWebAuthnForLoginV2((0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__["default"])({}, payload, {
|
|
6186
6195
|
options: publicKey
|
|
6187
6196
|
}));
|
|
@@ -6193,7 +6202,7 @@ const _excluded = ["callback"],
|
|
|
6193
6202
|
} catch (e) {
|
|
6194
6203
|
setLoginState({
|
|
6195
6204
|
loading: false,
|
|
6196
|
-
error: (0,
|
|
6205
|
+
error: (0,_helpers__WEBPACK_IMPORTED_MODULE_14__.errorHandler)(e)
|
|
6197
6206
|
});
|
|
6198
6207
|
callback == null ? void 0 : callback(null);
|
|
6199
6208
|
}
|
|
@@ -6216,7 +6225,7 @@ const _excluded = ["callback"],
|
|
|
6216
6225
|
} catch (e) {
|
|
6217
6226
|
setLoginState({
|
|
6218
6227
|
loading: false,
|
|
6219
|
-
error: (0,
|
|
6228
|
+
error: (0,_helpers__WEBPACK_IMPORTED_MODULE_14__.errorHandler)(e)
|
|
6220
6229
|
});
|
|
6221
6230
|
callback == null ? void 0 : callback(null);
|
|
6222
6231
|
}
|
|
@@ -6233,7 +6242,7 @@ const _excluded = ["callback"],
|
|
|
6233
6242
|
const data = await api.auth.preEnrollMFASMSForLogin(payload);
|
|
6234
6243
|
actions.setMfaState({
|
|
6235
6244
|
otcToken: data.otcToken,
|
|
6236
|
-
step:
|
|
6245
|
+
step: _MfaState_interfaces__WEBPACK_IMPORTED_MODULE_23__.MFAStep.smsVerifyCode,
|
|
6237
6246
|
phoneNumber: data.phoneNumber
|
|
6238
6247
|
});
|
|
6239
6248
|
setLoginState({
|
|
@@ -6243,7 +6252,7 @@ const _excluded = ["callback"],
|
|
|
6243
6252
|
} catch (e) {
|
|
6244
6253
|
setLoginState({
|
|
6245
6254
|
loading: false,
|
|
6246
|
-
error: (0,
|
|
6255
|
+
error: (0,_helpers__WEBPACK_IMPORTED_MODULE_14__.errorHandler)(e)
|
|
6247
6256
|
});
|
|
6248
6257
|
callback == null ? void 0 : callback(null);
|
|
6249
6258
|
}
|
|
@@ -6266,7 +6275,7 @@ const _excluded = ["callback"],
|
|
|
6266
6275
|
} catch (e) {
|
|
6267
6276
|
setLoginState({
|
|
6268
6277
|
loading: false,
|
|
6269
|
-
error: (0,
|
|
6278
|
+
error: (0,_helpers__WEBPACK_IMPORTED_MODULE_14__.errorHandler)(e)
|
|
6270
6279
|
});
|
|
6271
6280
|
callback == null ? void 0 : callback(null);
|
|
6272
6281
|
}
|
|
@@ -6278,7 +6287,7 @@ const _excluded = ["callback"],
|
|
|
6278
6287
|
activeTenant
|
|
6279
6288
|
} = payload;
|
|
6280
6289
|
const mfaState = {
|
|
6281
|
-
step:
|
|
6290
|
+
step: _MfaState_interfaces__WEBPACK_IMPORTED_MODULE_23__.MFAStep.recoveryCode,
|
|
6282
6291
|
loading: false,
|
|
6283
6292
|
error: undefined,
|
|
6284
6293
|
saving: false
|
|
@@ -6294,7 +6303,7 @@ const _excluded = ["callback"],
|
|
|
6294
6303
|
loading: false
|
|
6295
6304
|
});
|
|
6296
6305
|
if (user.id) {
|
|
6297
|
-
|
|
6306
|
+
await _toolkit__WEBPACK_IMPORTED_MODULE_3__.LocalStorage.setItem('userId', user.id);
|
|
6298
6307
|
}
|
|
6299
6308
|
};
|
|
6300
6309
|
const resetBreachedPassword = async payload => {
|
|
@@ -6306,7 +6315,7 @@ const _excluded = ["callback"],
|
|
|
6306
6315
|
setLoginState({
|
|
6307
6316
|
loading: false,
|
|
6308
6317
|
error: undefined,
|
|
6309
|
-
step:
|
|
6318
|
+
step: _interfaces__WEBPACK_IMPORTED_MODULE_5__.LoginStep.breachedPasswordSuccess
|
|
6310
6319
|
});
|
|
6311
6320
|
actions.setAuthState({
|
|
6312
6321
|
isAuthenticated: false
|
|
@@ -6314,7 +6323,7 @@ const _excluded = ["callback"],
|
|
|
6314
6323
|
} catch (e) {
|
|
6315
6324
|
setLoginState({
|
|
6316
6325
|
loading: false,
|
|
6317
|
-
error: (0,
|
|
6326
|
+
error: (0,_helpers__WEBPACK_IMPORTED_MODULE_14__.errorHandler)(e)
|
|
6318
6327
|
});
|
|
6319
6328
|
}
|
|
6320
6329
|
};
|
|
@@ -6367,7 +6376,7 @@ const _excluded = ["callback"],
|
|
|
6367
6376
|
tenants = [],
|
|
6368
6377
|
activeTenant
|
|
6369
6378
|
} = await api.auth.refreshTokenV3();
|
|
6370
|
-
if ((0,
|
|
6379
|
+
if ((0,_helpers__WEBPACK_IMPORTED_MODULE_4__.isMfaRequired)(user, store.root.appName)) {
|
|
6371
6380
|
const mfaRequiredState = await actions.getMfaRequiredState(user);
|
|
6372
6381
|
actions.setAuthState(mfaRequiredState);
|
|
6373
6382
|
onRedirectTo(routes.loginUrl, {
|
|
@@ -6378,7 +6387,7 @@ const _excluded = ["callback"],
|
|
|
6378
6387
|
const shouldShowPrompt = await actions.__shouldShowPromptPasskeys();
|
|
6379
6388
|
if (shouldShowPrompt) {
|
|
6380
6389
|
actions.setLoginState({
|
|
6381
|
-
step:
|
|
6390
|
+
step: _interfaces__WEBPACK_IMPORTED_MODULE_5__.LoginStep.promptPasskeys,
|
|
6382
6391
|
loading: false
|
|
6383
6392
|
});
|
|
6384
6393
|
actions.afterAuthenticationStateUpdate({
|
|
@@ -6394,10 +6403,10 @@ const _excluded = ["callback"],
|
|
|
6394
6403
|
} else {
|
|
6395
6404
|
var _ref4;
|
|
6396
6405
|
if (user.id) {
|
|
6397
|
-
|
|
6406
|
+
await _toolkit__WEBPACK_IMPORTED_MODULE_3__.LocalStorage.setItem('userId', user.id);
|
|
6398
6407
|
}
|
|
6399
|
-
const quickLoginToRegister = (_ref4 =
|
|
6400
|
-
const shouldNavigateToRegisterQuickLogin = __shouldNevigateToRegisterQuickLogin(user);
|
|
6408
|
+
const quickLoginToRegister = (_ref4 = await _toolkit__WEBPACK_IMPORTED_MODULE_3__.LocalStorage.getItem('register-quick-login')) != null ? _ref4 : loginState.quickLoginToRegister;
|
|
6409
|
+
const shouldNavigateToRegisterQuickLogin = await __shouldNevigateToRegisterQuickLogin(user);
|
|
6401
6410
|
actions.afterAuthenticationStateUpdate({
|
|
6402
6411
|
user: updatedUser,
|
|
6403
6412
|
tenants,
|
|
@@ -6405,7 +6414,7 @@ const _excluded = ["callback"],
|
|
|
6405
6414
|
}, {
|
|
6406
6415
|
loginState: (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__["default"])({}, loginState, {
|
|
6407
6416
|
quickLoginToRegister,
|
|
6408
|
-
flow: shouldNavigateToRegisterQuickLogin ?
|
|
6417
|
+
flow: shouldNavigateToRegisterQuickLogin ? _interfaces__WEBPACK_IMPORTED_MODULE_5__.LoginFlow.RegisterQuickLogin : _interfaces__WEBPACK_IMPORTED_MODULE_5__.LoginFlow.Login
|
|
6409
6418
|
}),
|
|
6410
6419
|
isAuthenticated: true
|
|
6411
6420
|
});
|
|
@@ -6460,7 +6469,7 @@ const _excluded = ["callback"],
|
|
|
6460
6469
|
refreshTokenForSocialLogins,
|
|
6461
6470
|
// protected
|
|
6462
6471
|
__refreshToken
|
|
6463
|
-
}, (0,
|
|
6472
|
+
}, (0,_hostedLoginAuthorize_actions__WEBPACK_IMPORTED_MODULE_24__["default"])(store, api, sharedActions), (0,_afterAuthNavigation_actions__WEBPACK_IMPORTED_MODULE_25__["default"])(store, api, sharedActions), (0,_handleVerifyMFAResponse_actions__WEBPACK_IMPORTED_MODULE_26__["default"])(store, api, sharedActions), (0,_mfaRequiredState_actions__WEBPACK_IMPORTED_MODULE_27__["default"])(store, api, sharedActions), (0,_mfaWithAuthenticator_actions__WEBPACK_IMPORTED_MODULE_28__["default"])(store, api, sharedActions), (0,_mfaWithEmailCode_actions__WEBPACK_IMPORTED_MODULE_29__["default"])(store, api, sharedActions), (0,_mfaWithSMS_actions__WEBPACK_IMPORTED_MODULE_30__["default"])(store, api, sharedActions), (0,_mfaWithWebAuthn_actions__WEBPACK_IMPORTED_MODULE_31__["default"])(store, api, sharedActions));
|
|
6464
6473
|
});
|
|
6465
6474
|
|
|
6466
6475
|
/***/ }),
|
|
@@ -6481,6 +6490,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
6481
6490
|
/* harmony import */ var _interfaces__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../interfaces */ "../../dist/@frontegg/redux-store/auth/LoginState/interfaces.js");
|
|
6482
6491
|
/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../helpers */ "../../dist/@frontegg/redux-store/helpers/common.js");
|
|
6483
6492
|
/* 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
|
+
|
|
6484
6495
|
|
|
6485
6496
|
|
|
6486
6497
|
|
|
@@ -6514,7 +6525,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
6514
6525
|
step = _interfaces__WEBPACK_IMPORTED_MODULE_1__.LoginStep.forceTwoFactor;
|
|
6515
6526
|
}
|
|
6516
6527
|
let quickLoginState = {};
|
|
6517
|
-
const quickLoginToRegister =
|
|
6528
|
+
const quickLoginToRegister = await _toolkit__WEBPACK_IMPORTED_MODULE_5__.LocalStorage.getItem('register-quick-login');
|
|
6518
6529
|
if (quickLoginToRegister) {
|
|
6519
6530
|
quickLoginState = {
|
|
6520
6531
|
quickLoginToRegister,
|
|
@@ -6561,12 +6572,14 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
6561
6572
|
/* 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");
|
|
6562
6573
|
/* 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");
|
|
6563
6574
|
/* harmony import */ var _interfaces__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../interfaces */ "../../dist/@frontegg/redux-store/auth/LoginState/interfaces.js");
|
|
6564
|
-
/* harmony import */ var
|
|
6575
|
+
/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../helpers */ "../../dist/@frontegg/redux-store/helpers/handlers.js");
|
|
6576
|
+
/* harmony import */ var _toolkit__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../toolkit */ "../../dist/@frontegg/redux-store/toolkit/LocalStorage.js");
|
|
6565
6577
|
|
|
6566
6578
|
|
|
6567
6579
|
const _excluded = ["callback"];
|
|
6568
6580
|
|
|
6569
6581
|
|
|
6582
|
+
|
|
6570
6583
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ((store, api, sharedActions) => {
|
|
6571
6584
|
const actions = sharedActions;
|
|
6572
6585
|
|
|
@@ -6664,7 +6677,7 @@ const _excluded = ["callback"];
|
|
|
6664
6677
|
activeTenant
|
|
6665
6678
|
}, additionalUpdate);
|
|
6666
6679
|
if (user.id) {
|
|
6667
|
-
|
|
6680
|
+
await _toolkit__WEBPACK_IMPORTED_MODULE_3__.LocalStorage.setItem('userId', user.id);
|
|
6668
6681
|
}
|
|
6669
6682
|
setLoadingAction({
|
|
6670
6683
|
loading: false,
|
|
@@ -6677,7 +6690,7 @@ const _excluded = ["callback"];
|
|
|
6677
6690
|
} catch (e) {
|
|
6678
6691
|
setLoadingAction({
|
|
6679
6692
|
loading: false,
|
|
6680
|
-
error: (0,
|
|
6693
|
+
error: (0,_helpers__WEBPACK_IMPORTED_MODULE_4__.errorHandler)(e)
|
|
6681
6694
|
});
|
|
6682
6695
|
callback == null ? void 0 : callback(false, e);
|
|
6683
6696
|
}
|
|
@@ -7157,9 +7170,11 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
7157
7170
|
/* harmony export */ isEmailPayload: () => (/* binding */ isEmailPayload),
|
|
7158
7171
|
/* harmony export */ isOauthCallbackRoute: () => (/* binding */ isOauthCallbackRoute)
|
|
7159
7172
|
/* harmony export */ });
|
|
7160
|
-
/* harmony import */ var
|
|
7161
|
-
/* harmony import */ var
|
|
7162
|
-
/* harmony import */ var
|
|
7173
|
+
/* harmony import */ var _frontegg_rest_api__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @frontegg/rest-api */ "../../node_modules/@frontegg/rest-api/auth/interfaces.js");
|
|
7174
|
+
/* harmony import */ var _frontegg_rest_api__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @frontegg/rest-api */ "../../node_modules/@frontegg/rest-api/ContextHolder/index.js");
|
|
7175
|
+
/* harmony import */ var _MfaState_interfaces__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../MfaState/interfaces */ "../../dist/@frontegg/redux-store/auth/MfaState/interfaces.js");
|
|
7176
|
+
/* harmony import */ var _toolkit__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../toolkit */ "../../dist/@frontegg/redux-store/toolkit/WindowLocation.js");
|
|
7177
|
+
|
|
7163
7178
|
|
|
7164
7179
|
|
|
7165
7180
|
const isAbsoluteUrl = path => {
|
|
@@ -7171,7 +7186,7 @@ const isAbsoluteUrl = path => {
|
|
|
7171
7186
|
}
|
|
7172
7187
|
};
|
|
7173
7188
|
const isValidRedirectUrl = (redirectUrl, allowedRedirectOrigins) => {
|
|
7174
|
-
const currentUrl = new URL(
|
|
7189
|
+
const currentUrl = new URL(_toolkit__WEBPACK_IMPORTED_MODULE_0__.WindowLocation.href);
|
|
7175
7190
|
const redirectURL = new URL(redirectUrl);
|
|
7176
7191
|
const isSameSite = redirectURL.origin === currentUrl.origin;
|
|
7177
7192
|
const isOriginInWhiteList = allowedRedirectOrigins.includes(redirectURL.origin);
|
|
@@ -7183,7 +7198,7 @@ const getRedirectUrl = ({
|
|
|
7183
7198
|
allowedRedirectOrigins,
|
|
7184
7199
|
includeQueryParam
|
|
7185
7200
|
}) => {
|
|
7186
|
-
const currentUrl = new URL(
|
|
7201
|
+
const currentUrl = new URL(_toolkit__WEBPACK_IMPORTED_MODULE_0__.WindowLocation.href);
|
|
7187
7202
|
let redirectUrl = authenticatedUrl;
|
|
7188
7203
|
const redirectUrlQueryParam = currentUrl.searchParams.get('redirectUrl');
|
|
7189
7204
|
if (redirectUrlQueryParam) {
|
|
@@ -7197,7 +7212,7 @@ const getRedirectUrl = ({
|
|
|
7197
7212
|
}
|
|
7198
7213
|
}
|
|
7199
7214
|
} else if (includeQueryParam) {
|
|
7200
|
-
redirectUrl +=
|
|
7215
|
+
redirectUrl += _toolkit__WEBPACK_IMPORTED_MODULE_0__.WindowLocation.search;
|
|
7201
7216
|
}
|
|
7202
7217
|
return redirectUrl;
|
|
7203
7218
|
};
|
|
@@ -7228,7 +7243,7 @@ const getPathAndSearchParamsFromUrl = url => {
|
|
|
7228
7243
|
* @returns the value of the param as string or undefined if it does not exist
|
|
7229
7244
|
*/
|
|
7230
7245
|
const getSearchParam = key => {
|
|
7231
|
-
const params = new URLSearchParams(
|
|
7246
|
+
const params = new URLSearchParams(_toolkit__WEBPACK_IMPORTED_MODULE_0__.WindowLocation.search);
|
|
7232
7247
|
const param = params.get(key);
|
|
7233
7248
|
return param != null ? param : undefined;
|
|
7234
7249
|
};
|
|
@@ -7256,27 +7271,27 @@ const getMfaStepForEnrolledUsers = mfaDevices => {
|
|
|
7256
7271
|
} = getNumberOfMfaDevices(mfaDevices);
|
|
7257
7272
|
if (totalDevices === 1) {
|
|
7258
7273
|
if (numberOfAuthenticators) {
|
|
7259
|
-
return
|
|
7274
|
+
return _MfaState_interfaces__WEBPACK_IMPORTED_MODULE_1__.MFAStep.authenticatorApp;
|
|
7260
7275
|
} else if (numberOfPhoneDevices) {
|
|
7261
|
-
return
|
|
7276
|
+
return _MfaState_interfaces__WEBPACK_IMPORTED_MODULE_1__.MFAStep.smsVerifyCode;
|
|
7262
7277
|
} else if (numberOfEmails) {
|
|
7263
|
-
return
|
|
7278
|
+
return _MfaState_interfaces__WEBPACK_IMPORTED_MODULE_1__.MFAStep.emailVerifyCode;
|
|
7264
7279
|
}
|
|
7265
7280
|
}
|
|
7266
|
-
return
|
|
7281
|
+
return _MfaState_interfaces__WEBPACK_IMPORTED_MODULE_1__.MFAStep.verify;
|
|
7267
7282
|
};
|
|
7268
7283
|
const getMfaStepForNotEnrolledUsers = mfaStrategies => {
|
|
7269
7284
|
if (mfaStrategies.length === 1) {
|
|
7270
7285
|
const [strategy] = mfaStrategies;
|
|
7271
|
-
if (strategy ===
|
|
7272
|
-
return
|
|
7273
|
-
} else if (strategy ===
|
|
7274
|
-
return
|
|
7275
|
-
} else if (strategy ===
|
|
7276
|
-
return
|
|
7286
|
+
if (strategy === _frontegg_rest_api__WEBPACK_IMPORTED_MODULE_2__.MFAStrategyEnum.AuthenticatorApp) {
|
|
7287
|
+
return _MfaState_interfaces__WEBPACK_IMPORTED_MODULE_1__.MFAStep.authenticatorApp;
|
|
7288
|
+
} else if (strategy === _frontegg_rest_api__WEBPACK_IMPORTED_MODULE_2__.MFAStrategyEnum.SMS) {
|
|
7289
|
+
return _MfaState_interfaces__WEBPACK_IMPORTED_MODULE_1__.MFAStep.smsSetPhoneNumber;
|
|
7290
|
+
} else if (strategy === _frontegg_rest_api__WEBPACK_IMPORTED_MODULE_2__.MFAStrategyEnum.EmailCode) {
|
|
7291
|
+
return _MfaState_interfaces__WEBPACK_IMPORTED_MODULE_1__.MFAStep.emailVerifyCode;
|
|
7277
7292
|
}
|
|
7278
7293
|
}
|
|
7279
|
-
return
|
|
7294
|
+
return _MfaState_interfaces__WEBPACK_IMPORTED_MODULE_1__.MFAStep.verify;
|
|
7280
7295
|
};
|
|
7281
7296
|
const isOauthCallbackRoute = activeUri => {
|
|
7282
7297
|
return activeUri === '/oauth/callback';
|
|
@@ -7285,7 +7300,7 @@ function isEmailPayload(payload) {
|
|
|
7285
7300
|
return 'email' in payload;
|
|
7286
7301
|
}
|
|
7287
7302
|
const getBaseNameWithoutSlashSuffix = state => {
|
|
7288
|
-
const basename =
|
|
7303
|
+
const basename = _frontegg_rest_api__WEBPACK_IMPORTED_MODULE_3__.ContextHolder.for(state.root.appName).getBasename();
|
|
7289
7304
|
if (basename != null && basename.endsWith('/')) {
|
|
7290
7305
|
return basename.slice(0, -1);
|
|
7291
7306
|
}
|
|
@@ -9405,6 +9420,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
9405
9420
|
/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../helpers */ "../../dist/@frontegg/redux-store/helpers/handlers.js");
|
|
9406
9421
|
/* harmony import */ var _state__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./state */ "../../dist/@frontegg/redux-store/auth/PasskeysState/state.js");
|
|
9407
9422
|
/* 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
|
+
|
|
9408
9425
|
|
|
9409
9426
|
|
|
9410
9427
|
|
|
@@ -9483,8 +9500,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
9483
9500
|
policy
|
|
9484
9501
|
} = publicAuthStrategyPolicy;
|
|
9485
9502
|
const isPasskeysEnabledByVendor = await getPasskeysVendorPolicy(policy);
|
|
9486
|
-
const isLoggedInWithPasskeys =
|
|
9487
|
-
const isMarkedDontShowAgainPrompt =
|
|
9503
|
+
const isLoggedInWithPasskeys = (await _toolkit__WEBPACK_IMPORTED_MODULE_4__.LocalStorage.getItem('preferred-login-method')) === 'Passkeys';
|
|
9504
|
+
const isMarkedDontShowAgainPrompt = (await _toolkit__WEBPACK_IMPORTED_MODULE_4__.LocalStorage.getItem('dont-show-again-prompt-passkeys')) === 'true';
|
|
9488
9505
|
const [showPasskeys] = await actions.getFeatureFlags(['show-passkeys-new']);
|
|
9489
9506
|
if (!showPasskeys || !isPasskeysEnabledByVendor || isLoggedInWithPasskeys || isMarkedDontShowAgainPrompt) {
|
|
9490
9507
|
return false;
|
|
@@ -13345,6 +13362,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
13345
13362
|
/* harmony import */ var _state__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./state */ "../../dist/@frontegg/redux-store/auth/SocialLoginState/state.js");
|
|
13346
13363
|
/* harmony import */ var _interfaces__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../interfaces */ "../../dist/@frontegg/redux-store/auth/interfaces.js");
|
|
13347
13364
|
/* 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");
|
|
13348
13366
|
|
|
13349
13367
|
|
|
13350
13368
|
const _excluded = ["authorizationUrl"],
|
|
@@ -13353,6 +13371,7 @@ const _excluded = ["authorizationUrl"],
|
|
|
13353
13371
|
|
|
13354
13372
|
|
|
13355
13373
|
|
|
13374
|
+
|
|
13356
13375
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ((store, api, sharedActions) => {
|
|
13357
13376
|
const actions = sharedActions;
|
|
13358
13377
|
|
|
@@ -13480,14 +13499,14 @@ const _excluded = ["authorizationUrl"],
|
|
|
13480
13499
|
(0,_helpers_gtm__WEBPACK_IMPORTED_MODULE_6__.reportGTMEvent)(_helpers_gtm__WEBPACK_IMPORTED_MODULE_6__.GTMEventAction.USER_VERIFIED, userVerifiedPayload);
|
|
13481
13500
|
}
|
|
13482
13501
|
if (userId) {
|
|
13483
|
-
|
|
13502
|
+
await _toolkit__WEBPACK_IMPORTED_MODULE_7__.LocalStorage.setItem('userId', userId);
|
|
13484
13503
|
}
|
|
13485
13504
|
actions.setLoginState({
|
|
13486
13505
|
email,
|
|
13487
13506
|
isNewUser
|
|
13488
13507
|
});
|
|
13489
|
-
actions.refreshTokenForSocialLogins();
|
|
13490
|
-
|
|
13508
|
+
await actions.refreshTokenForSocialLogins();
|
|
13509
|
+
await _toolkit__WEBPACK_IMPORTED_MODULE_7__.LocalStorage.removeItem('register-quick-login');
|
|
13491
13510
|
setSocialLoginsState({
|
|
13492
13511
|
loading: false
|
|
13493
13512
|
});
|
|
@@ -13545,10 +13564,13 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
13545
13564
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
13546
13565
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
13547
13566
|
/* harmony export */ });
|
|
13548
|
-
/* harmony import */ var
|
|
13567
|
+
/* harmony import */ var _frontegg_rest_api__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @frontegg/rest-api */ "../../node_modules/@frontegg/rest-api/ContextHolder/index.js");
|
|
13549
13568
|
/* harmony import */ var _LoginState_helpers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../LoginState/helpers */ "../../dist/@frontegg/redux-store/auth/LoginState/helpers.js");
|
|
13550
13569
|
/* harmony import */ var _MfaState_interfaces__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../MfaState/interfaces */ "../../dist/@frontegg/redux-store/auth/MfaState/interfaces.js");
|
|
13551
|
-
/* harmony import */ var
|
|
13570
|
+
/* harmony import */ var _consts__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../consts */ "../../dist/@frontegg/redux-store/auth/StepUpState/consts.js");
|
|
13571
|
+
/* harmony import */ var _toolkit__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../toolkit */ "../../dist/@frontegg/redux-store/toolkit/LocalStorage.js");
|
|
13572
|
+
|
|
13573
|
+
|
|
13552
13574
|
|
|
13553
13575
|
|
|
13554
13576
|
|
|
@@ -13610,9 +13632,9 @@ const isMfaIsNotEnrolledError = error => (error == null ? void 0 : error['messag
|
|
|
13610
13632
|
});
|
|
13611
13633
|
return;
|
|
13612
13634
|
}
|
|
13613
|
-
|
|
13635
|
+
await _toolkit__WEBPACK_IMPORTED_MODULE_2__.LocalStorage.setItem(_consts__WEBPACK_IMPORTED_MODULE_3__.SHOULD_STEP_UP_KEY, 'true');
|
|
13614
13636
|
const routes = store.auth.routes;
|
|
13615
|
-
|
|
13637
|
+
_frontegg_rest_api__WEBPACK_IMPORTED_MODULE_4__.ContextHolder.for(store.root.appName).onRedirectTo(routes.logoutUrl, {
|
|
13616
13638
|
preserveQueryParams: true
|
|
13617
13639
|
});
|
|
13618
13640
|
};
|
|
@@ -13786,6 +13808,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
13786
13808
|
/* harmony export */ });
|
|
13787
13809
|
/* harmony import */ var _consts__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../consts */ "../../dist/@frontegg/redux-store/auth/StepUpState/consts.js");
|
|
13788
13810
|
/* 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
|
+
|
|
13789
13813
|
|
|
13790
13814
|
|
|
13791
13815
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ((store, api, sharedActions) => {
|
|
@@ -13810,8 +13834,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
13810
13834
|
if (alias) {
|
|
13811
13835
|
params['organization'] = alias;
|
|
13812
13836
|
}
|
|
13813
|
-
(0,_helpers__WEBPACK_IMPORTED_MODULE_1__.setAfterAuthRedirectUrlForStepUp)();
|
|
13814
|
-
|
|
13837
|
+
await (0,_helpers__WEBPACK_IMPORTED_MODULE_1__.setAfterAuthRedirectUrlForStepUp)();
|
|
13838
|
+
await _toolkit__WEBPACK_IMPORTED_MODULE_2__.LocalStorage.setItem(_consts__WEBPACK_IMPORTED_MODULE_0__.SHOULD_STEP_UP_KEY, 'true');
|
|
13815
13839
|
await actions.__requestHostedLoginAuthorize(params);
|
|
13816
13840
|
};
|
|
13817
13841
|
return {
|
|
@@ -13877,8 +13901,11 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
13877
13901
|
/* harmony export */ redirectByStepUpUrl: () => (/* binding */ redirectByStepUpUrl),
|
|
13878
13902
|
/* harmony export */ setAfterAuthRedirectUrlForStepUp: () => (/* binding */ setAfterAuthRedirectUrlForStepUp)
|
|
13879
13903
|
/* harmony export */ });
|
|
13880
|
-
/* harmony import */ var
|
|
13904
|
+
/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../constants */ "../../dist/@frontegg/redux-store/constants.js");
|
|
13881
13905
|
/* 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
|
+
|
|
13882
13909
|
|
|
13883
13910
|
|
|
13884
13911
|
/**
|
|
@@ -13911,9 +13938,9 @@ const isSteppedUp = (user, {
|
|
|
13911
13938
|
/**
|
|
13912
13939
|
* Set the url and query params in the local storage FRONTEGG_AFTER_AUTH_REDIRECT_URL value
|
|
13913
13940
|
*/
|
|
13914
|
-
function setAfterAuthRedirectUrlForStepUp() {
|
|
13915
|
-
const encodedRedirectUrl =
|
|
13916
|
-
|
|
13941
|
+
async function setAfterAuthRedirectUrlForStepUp() {
|
|
13942
|
+
const encodedRedirectUrl = _toolkit__WEBPACK_IMPORTED_MODULE_1__.WindowLocation.pathname + _toolkit__WEBPACK_IMPORTED_MODULE_1__.WindowLocation.search;
|
|
13943
|
+
await _toolkit__WEBPACK_IMPORTED_MODULE_2__.LocalStorage.setItem(_constants__WEBPACK_IMPORTED_MODULE_3__.FRONTEGG_AFTER_AUTH_REDIRECT_URL, encodedRedirectUrl);
|
|
13917
13944
|
}
|
|
13918
13945
|
|
|
13919
13946
|
/**
|
|
@@ -13923,9 +13950,9 @@ function setAfterAuthRedirectUrlForStepUp() {
|
|
|
13923
13950
|
* @param onRedirectTo - redirect to function
|
|
13924
13951
|
* @param maxAge - max age of step up
|
|
13925
13952
|
*/
|
|
13926
|
-
const redirectByStepUpUrl = (stepUpUrl, onRedirectTo, maxAge) => {
|
|
13927
|
-
setAfterAuthRedirectUrlForStepUp();
|
|
13928
|
-
const searchParams = new URLSearchParams(
|
|
13953
|
+
const redirectByStepUpUrl = async (stepUpUrl, onRedirectTo, maxAge) => {
|
|
13954
|
+
await setAfterAuthRedirectUrlForStepUp();
|
|
13955
|
+
const searchParams = new URLSearchParams(_toolkit__WEBPACK_IMPORTED_MODULE_1__.WindowLocation.search);
|
|
13929
13956
|
if (maxAge) {
|
|
13930
13957
|
searchParams.set(_consts__WEBPACK_IMPORTED_MODULE_0__.STEP_UP_MAX_AGE_PARAM_NAME, maxAge.toString());
|
|
13931
13958
|
}
|
|
@@ -16913,8 +16940,10 @@ let GTMEventAction;
|
|
|
16913
16940
|
* @param payload
|
|
16914
16941
|
*/
|
|
16915
16942
|
function reportGTMEvent(action, payload) {
|
|
16916
|
-
|
|
16917
|
-
|
|
16943
|
+
if (typeof window !== 'undefined') {
|
|
16944
|
+
var _window$onFronteggEve, _window;
|
|
16945
|
+
(_window$onFronteggEve = (_window = window).onFronteggEvent) == null ? void 0 : _window$onFronteggEve.call(_window, action, payload);
|
|
16946
|
+
}
|
|
16918
16947
|
}
|
|
16919
16948
|
|
|
16920
16949
|
/***/ }),
|
|
@@ -17016,6 +17045,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
17016
17045
|
/* harmony export */ generateCodeChallengePureJs: () => (/* binding */ generateCodeChallengePureJs)
|
|
17017
17046
|
/* harmony export */ });
|
|
17018
17047
|
/* 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
|
+
|
|
17019
17050
|
|
|
17020
17051
|
async function generateCodeChallengePureJs(codeVerifier) {
|
|
17021
17052
|
// noinspection TypeScriptValidateJSTypes pure sha256 recevie single params alg name
|
|
@@ -17032,7 +17063,7 @@ async function generateCodeChallenge(codeVerifier) {
|
|
|
17032
17063
|
if ((_window$crypto = window.crypto) != null && (_window$crypto$subtle = _window$crypto.subtle) != null && _window$crypto$subtle.digest) {
|
|
17033
17064
|
return generateCodeChallengeNative(codeVerifier);
|
|
17034
17065
|
} else {
|
|
17035
|
-
console.warn('Generating CodeChallenge in non-secure domain:',
|
|
17066
|
+
console.warn('Generating CodeChallenge in non-secure domain:', _toolkit__WEBPACK_IMPORTED_MODULE_1__.WindowLocation.origin);
|
|
17036
17067
|
return generateCodeChallengePureJs(codeVerifier);
|
|
17037
17068
|
}
|
|
17038
17069
|
}
|
|
@@ -17514,6 +17545,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
17514
17545
|
/* harmony export */ GroupsStateKeys: () => (/* reexport safe */ _toolkit__WEBPACK_IMPORTED_MODULE_0__.GroupsStateKeys),
|
|
17515
17546
|
/* harmony export */ HOSTED_LOGIN_VERIFIER_KEY: () => (/* reexport safe */ _constants__WEBPACK_IMPORTED_MODULE_1__.HOSTED_LOGIN_VERIFIER_KEY),
|
|
17516
17547
|
/* harmony export */ ImpersonateStep: () => (/* reexport safe */ _toolkit__WEBPACK_IMPORTED_MODULE_0__.ImpersonateStep),
|
|
17548
|
+
/* harmony export */ LocalStorage: () => (/* reexport safe */ _toolkit__WEBPACK_IMPORTED_MODULE_0__.LocalStorage),
|
|
17517
17549
|
/* harmony export */ LoginActionTypes: () => (/* reexport safe */ _toolkit__WEBPACK_IMPORTED_MODULE_0__.LoginActionTypes),
|
|
17518
17550
|
/* harmony export */ LoginFlow: () => (/* reexport safe */ _toolkit__WEBPACK_IMPORTED_MODULE_0__.LoginFlow),
|
|
17519
17551
|
/* harmony export */ LoginStep: () => (/* reexport safe */ _toolkit__WEBPACK_IMPORTED_MODULE_0__.LoginStep),
|
|
@@ -17529,12 +17561,14 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
17529
17561
|
/* harmony export */ STEP_UP_MAX_AGE_PARAM_NAME: () => (/* reexport safe */ _constants__WEBPACK_IMPORTED_MODULE_1__.STEP_UP_MAX_AGE_PARAM_NAME),
|
|
17530
17562
|
/* harmony export */ SamlVendors: () => (/* reexport safe */ _toolkit__WEBPACK_IMPORTED_MODULE_0__.SamlVendors),
|
|
17531
17563
|
/* harmony export */ SecurityCenterStateKeys: () => (/* reexport safe */ _toolkit__WEBPACK_IMPORTED_MODULE_0__.SecurityCenterStateKeys),
|
|
17564
|
+
/* harmony export */ SessionStorage: () => (/* reexport safe */ _toolkit__WEBPACK_IMPORTED_MODULE_0__.SessionStorage),
|
|
17532
17565
|
/* harmony export */ SignUpStage: () => (/* reexport safe */ _toolkit__WEBPACK_IMPORTED_MODULE_0__.SignUpStage),
|
|
17533
17566
|
/* harmony export */ SubscriptionCancellationPolicy: () => (/* reexport safe */ _subscriptions_interfaces__WEBPACK_IMPORTED_MODULE_6__.SubscriptionCancellationPolicy),
|
|
17534
17567
|
/* harmony export */ SubscriptionStatus: () => (/* reexport safe */ _subscriptions_interfaces__WEBPACK_IMPORTED_MODULE_6__.SubscriptionStatus),
|
|
17535
17568
|
/* harmony export */ TENANT_ID_PARAM_KEY: () => (/* reexport safe */ _auth_helpers__WEBPACK_IMPORTED_MODULE_3__.TENANT_ID_PARAM_KEY),
|
|
17536
17569
|
/* harmony export */ TeamStateKeys: () => (/* reexport safe */ _toolkit__WEBPACK_IMPORTED_MODULE_0__.TeamStateKeys),
|
|
17537
17570
|
/* harmony export */ UserVeirifedOriginTypes: () => (/* reexport safe */ _toolkit__WEBPACK_IMPORTED_MODULE_0__.UserVeirifedOriginTypes),
|
|
17571
|
+
/* harmony export */ WindowLocation: () => (/* reexport safe */ _toolkit__WEBPACK_IMPORTED_MODULE_0__.WindowLocation),
|
|
17538
17572
|
/* harmony export */ authStrategyLoginStepMap: () => (/* reexport safe */ _constants__WEBPACK_IMPORTED_MODULE_1__.authStrategyLoginStepMap),
|
|
17539
17573
|
/* harmony export */ base64ToFormData: () => (/* reexport safe */ _helpers__WEBPACK_IMPORTED_MODULE_2__.base64ToFormData),
|
|
17540
17574
|
/* harmony export */ base64urlDecode: () => (/* reexport safe */ _helpers__WEBPACK_IMPORTED_MODULE_2__.base64urlDecode),
|
|
@@ -17602,7 +17636,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
17602
17636
|
/* harmony import */ var _subscriptions_interfaces__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./subscriptions/interfaces */ "../../dist/@frontegg/redux-store/subscriptions/interfaces.js");
|
|
17603
17637
|
/* harmony import */ var _vendor__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./vendor */ "../../dist/@frontegg/redux-store/vendor/index.js");
|
|
17604
17638
|
/* harmony import */ var _audits__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./audits */ "../../dist/@frontegg/redux-store/audits/index.js");
|
|
17605
|
-
/** @license Frontegg v7.
|
|
17639
|
+
/** @license Frontegg v7.10.0-alpha.0
|
|
17606
17640
|
*
|
|
17607
17641
|
* This source code is licensed under the MIT license found in the
|
|
17608
17642
|
* LICENSE file in the root directory of this source tree.
|
|
@@ -23760,6 +23794,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
23760
23794
|
class FronteggNativeModule {
|
|
23761
23795
|
constructor() {
|
|
23762
23796
|
this.loginWithSSO = email => {
|
|
23797
|
+
if (typeof window == 'undefined') {
|
|
23798
|
+
throw new Error('FronteggNativeBridge is not available');
|
|
23799
|
+
}
|
|
23763
23800
|
if (this.isWebkitAvailable()) {
|
|
23764
23801
|
var _window$webkit, _window$webkit$messag, _window$webkit$messag2;
|
|
23765
23802
|
(_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({
|
|
@@ -23774,6 +23811,9 @@ class FronteggNativeModule {
|
|
|
23774
23811
|
}
|
|
23775
23812
|
};
|
|
23776
23813
|
this.loginWithSocialLogin = url => {
|
|
23814
|
+
if (typeof window == 'undefined') {
|
|
23815
|
+
throw new Error('FronteggNativeBridge is not available');
|
|
23816
|
+
}
|
|
23777
23817
|
if (this.isWebkitAvailable()) {
|
|
23778
23818
|
var _window$webkit2, _window$webkit2$messa, _window$webkit2$messa2;
|
|
23779
23819
|
(_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({
|
|
@@ -23789,15 +23829,15 @@ class FronteggNativeModule {
|
|
|
23789
23829
|
};
|
|
23790
23830
|
this.promptSocialLoginConsent = () => {
|
|
23791
23831
|
var _window$FronteggNativ3, _window$FronteggNativ4;
|
|
23792
|
-
return (_window$FronteggNativ3 = (_window$FronteggNativ4 = window.FronteggNativeBridgeFunctions) == null ? void 0 : _window$FronteggNativ4['shouldPromptSocialLoginConsent']) != null ? _window$FronteggNativ3 : false;
|
|
23832
|
+
return typeof window != 'undefined' && ((_window$FronteggNativ3 = (_window$FronteggNativ4 = window.FronteggNativeBridgeFunctions) == null ? void 0 : _window$FronteggNativ4['shouldPromptSocialLoginConsent']) != null ? _window$FronteggNativ3 : false);
|
|
23793
23833
|
};
|
|
23794
23834
|
}
|
|
23795
23835
|
isWebkitAvailable() {
|
|
23796
23836
|
var _window$webkit3, _window$webkit3$messa;
|
|
23797
|
-
return ((_window$webkit3 = window.webkit) == null ? void 0 : (_window$webkit3$messa = _window$webkit3.messageHandlers) == null ? void 0 : _window$webkit3$messa.FronteggNativeBridge) != null;
|
|
23837
|
+
return typeof window != 'undefined' && ((_window$webkit3 = window.webkit) == null ? void 0 : (_window$webkit3$messa = _window$webkit3.messageHandlers) == null ? void 0 : _window$webkit3$messa.FronteggNativeBridge) != null;
|
|
23798
23838
|
}
|
|
23799
23839
|
isJsInterfaceAvailable() {
|
|
23800
|
-
return window.FronteggNativeBridge != null;
|
|
23840
|
+
return typeof window != 'undefined' && window.FronteggNativeBridge != null;
|
|
23801
23841
|
}
|
|
23802
23842
|
isSocialLoginAvailable() {
|
|
23803
23843
|
return this.isAvailable('loginWithSocialLogin');
|
|
@@ -23806,7 +23846,7 @@ class FronteggNativeModule {
|
|
|
23806
23846
|
return this.isAvailable('loginWithSSO');
|
|
23807
23847
|
}
|
|
23808
23848
|
isAvailable(method) {
|
|
23809
|
-
if (this.isWebkitAvailable() || this.isJsInterfaceAvailable()) {
|
|
23849
|
+
if (typeof window != 'undefined' && (this.isWebkitAvailable() || this.isJsInterfaceAvailable())) {
|
|
23810
23850
|
var _window$FronteggNativ5, _window$FronteggNativ6;
|
|
23811
23851
|
return (_window$FronteggNativ5 = (_window$FronteggNativ6 = window.FronteggNativeBridgeFunctions) == null ? void 0 : _window$FronteggNativ6[method]) != null ? _window$FronteggNativ5 : false;
|
|
23812
23852
|
}
|
|
@@ -23817,6 +23857,486 @@ class FronteggNativeModule {
|
|
|
23817
23857
|
|
|
23818
23858
|
/***/ }),
|
|
23819
23859
|
|
|
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
|
+
|
|
23820
24340
|
/***/ "../../dist/@frontegg/redux-store/toolkit/index.js":
|
|
23821
24341
|
/*!*********************************************************!*\
|
|
23822
24342
|
!*** ../../dist/@frontegg/redux-store/toolkit/index.js ***!
|
|
@@ -23839,6 +24359,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
23839
24359
|
/* harmony export */ GroupRelations: () => (/* reexport safe */ _store__WEBPACK_IMPORTED_MODULE_1__.GroupRelations),
|
|
23840
24360
|
/* harmony export */ GroupsStateKeys: () => (/* reexport safe */ _store__WEBPACK_IMPORTED_MODULE_1__.GroupsStateKeys),
|
|
23841
24361
|
/* harmony export */ ImpersonateStep: () => (/* reexport safe */ _store__WEBPACK_IMPORTED_MODULE_1__.ImpersonateStep),
|
|
24362
|
+
/* harmony export */ LocalStorage: () => (/* reexport safe */ _LocalStorage__WEBPACK_IMPORTED_MODULE_4__.LocalStorage),
|
|
23842
24363
|
/* harmony export */ LoginActionTypes: () => (/* reexport safe */ _store__WEBPACK_IMPORTED_MODULE_1__.LoginActionTypes),
|
|
23843
24364
|
/* harmony export */ LoginFlow: () => (/* reexport safe */ _store__WEBPACK_IMPORTED_MODULE_1__.LoginFlow),
|
|
23844
24365
|
/* harmony export */ LoginStep: () => (/* reexport safe */ _store__WEBPACK_IMPORTED_MODULE_1__.LoginStep),
|
|
@@ -23850,9 +24371,11 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
23850
24371
|
/* harmony export */ SSOStateKeys: () => (/* reexport safe */ _store__WEBPACK_IMPORTED_MODULE_1__.SSOStateKeys),
|
|
23851
24372
|
/* harmony export */ SamlVendors: () => (/* reexport safe */ _store__WEBPACK_IMPORTED_MODULE_1__.SamlVendors),
|
|
23852
24373
|
/* harmony export */ SecurityCenterStateKeys: () => (/* reexport safe */ _store__WEBPACK_IMPORTED_MODULE_1__.SecurityCenterStateKeys),
|
|
24374
|
+
/* harmony export */ SessionStorage: () => (/* reexport safe */ _SessionStorage__WEBPACK_IMPORTED_MODULE_5__.SessionStorage),
|
|
23853
24375
|
/* harmony export */ SignUpStage: () => (/* reexport safe */ _store__WEBPACK_IMPORTED_MODULE_1__.SignUpStage),
|
|
23854
24376
|
/* harmony export */ TeamStateKeys: () => (/* reexport safe */ _store__WEBPACK_IMPORTED_MODULE_1__.TeamStateKeys),
|
|
23855
24377
|
/* harmony export */ UserVeirifedOriginTypes: () => (/* reexport safe */ _store__WEBPACK_IMPORTED_MODULE_1__.UserVeirifedOriginTypes),
|
|
24378
|
+
/* harmony export */ WindowLocation: () => (/* reexport safe */ _WindowLocation__WEBPACK_IMPORTED_MODULE_6__.WindowLocation),
|
|
23856
24379
|
/* harmony export */ buildAuthActions: () => (/* reexport safe */ _store__WEBPACK_IMPORTED_MODULE_1__.buildAuthActions),
|
|
23857
24380
|
/* harmony export */ createAuthState: () => (/* reexport safe */ _store__WEBPACK_IMPORTED_MODULE_1__.createAuthState),
|
|
23858
24381
|
/* harmony export */ createFronteggStore: () => (/* reexport safe */ _store__WEBPACK_IMPORTED_MODULE_1__.createFronteggStore),
|
|
@@ -23869,6 +24392,12 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
23869
24392
|
/* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./store */ "../../dist/@frontegg/redux-store/toolkit/store.js");
|
|
23870
24393
|
/* harmony import */ var _valtio__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../valtio */ "../../dist/@frontegg/redux-store/valtio/valtio.js");
|
|
23871
24394
|
/* 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
|
+
|
|
23872
24401
|
|
|
23873
24402
|
|
|
23874
24403
|
|
|
@@ -24064,7 +24593,7 @@ const createStore = options => {
|
|
|
24064
24593
|
auditLogs: auditsState,
|
|
24065
24594
|
audits: oldAuditsState
|
|
24066
24595
|
});
|
|
24067
|
-
if (typeof window !== 'undefined' && (localStorage['DEBUG_FRONTEGG_STORE'] === 'true' || "development" === 'development')) {
|
|
24596
|
+
if (typeof window !== 'undefined' && (window.localStorage['DEBUG_FRONTEGG_STORE'] === 'true' || "development" === 'development')) {
|
|
24068
24597
|
(0,_valtio__WEBPACK_IMPORTED_MODULE_11__.devtools)(store, {
|
|
24069
24598
|
name: `${appName} Store`,
|
|
24070
24599
|
enabled: true
|
|
@@ -24215,7 +24744,7 @@ function devtools(proxyObject, options) {
|
|
|
24215
24744
|
let extension;
|
|
24216
24745
|
try {
|
|
24217
24746
|
// @ts-ignore
|
|
24218
|
-
extension = enabled && window.__REDUX_DEVTOOLS_EXTENSION__;
|
|
24747
|
+
extension = enabled && typeof window != 'undefined' && window.__REDUX_DEVTOOLS_EXTENSION__;
|
|
24219
24748
|
} catch {
|
|
24220
24749
|
// ignored
|
|
24221
24750
|
}
|
|
@@ -25375,7 +25904,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
25375
25904
|
/* harmony export */ });
|
|
25376
25905
|
/* harmony import */ var _ThemeOptions__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ThemeOptions */ "../../dist/@frontegg/types/ThemeOptions/index.js");
|
|
25377
25906
|
/* harmony import */ var _Metadata__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Metadata */ "../../dist/@frontegg/types/Metadata/index.js");
|
|
25378
|
-
/** @license Frontegg v7.
|
|
25907
|
+
/** @license Frontegg v7.10.0-alpha.0
|
|
25379
25908
|
*
|
|
25380
25909
|
* This source code is licensed under the MIT license found in the
|
|
25381
25910
|
* LICENSE file in the root directory of this source tree.
|
|
@@ -33883,6 +34412,18 @@ const replaceNewProxy = (fn) => {
|
|
|
33883
34412
|
/******/ };
|
|
33884
34413
|
/******/ })();
|
|
33885
34414
|
/******/
|
|
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
|
+
/******/
|
|
33886
34427
|
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
|
33887
34428
|
/******/ (() => {
|
|
33888
34429
|
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
|