@frontegg/redux-store 7.35.0-alpha.1 → 7.36.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.
@@ -23,17 +23,19 @@ import mfaWithEmailCodeActions from './mfaWithEmailCode.actions';
23
23
  import mfaWithSMSActions from './mfaWithSMS.actions';
24
24
  import mfaWithWebAuthnActions from './mfaWithWebAuthn.actions';
25
25
  import { LoginFlow, LoginStep } from '../interfaces';
26
- import { base64urlDecode, deepResetState, errorHandler, errorTraceId, GTMEventAction, publicKeyCredentialToJSON, reportGTMEvent, retryIfNeeded, withRetryConfig } from '../../../helpers';
26
+ import { base64urlDecode, deepResetState, errorHandler, errorTraceId, publicKeyCredentialToJSON, retryIfNeeded, withRetryConfig } from '../../../helpers';
27
27
  import { initialState } from '../state';
28
28
  import { getSearchParam, isEmailPayload, TENANT_ID_PARAM_KEY } from '../helpers';
29
- import { AuthStrategyEnum, ContextHolder, removeTabTenantFromSessionStorage, WebAuthnDeviceType } from '@frontegg/rest-api';
29
+ import { AuthStrategyEnum, ContextHolder, WebAuthnDeviceType } from '@frontegg/rest-api';
30
30
  import hostedLoginAuthorizeActions from './hostedLoginAuthorize.actions';
31
31
  import { FronteggNativeModule, isEntitlementsDeeplyEqual } from '../../../toolkit';
32
32
  import { REQUEST_NAME, UserVerifiedOriginTypes } from '../../interfaces';
33
33
  import { authStrategyLoginStepMap } from '../consts';
34
+ import { GTMEventAction, reportGTMEvent } from '../../../helpers';
34
35
  import { isMfaRequired } from '../../helpers';
35
36
  import { MFAStep } from '../../MfaState/interfaces';
36
37
  import { SamlVendors } from '../../SSOState/interfaces';
38
+ import { removeTabTenantFromSessionStorage } from '@frontegg/rest-api';
37
39
  import { DEFAULT_RETRY_CONFIG } from '../../../constants';
38
40
  export default ((store, api, sharedActions) => {
39
41
  const actions = sharedActions;
@@ -980,29 +982,14 @@ export default ((store, api, sharedActions) => {
980
982
  callback
981
983
  } = payload;
982
984
  try {
983
- actions.setAuthState({
984
- userIpData: {
985
- loading: true
986
- }
987
- });
988
985
  const {
989
- ip,
990
- country_code
986
+ ip
991
987
  } = await api.metadata.getCurrentUserIpMetadata();
992
988
  actions.setAuthState({
993
- userIpData: {
994
- ip,
995
- countryCode: country_code,
996
- loading: false
997
- }
989
+ userIp: ip
998
990
  });
999
991
  callback == null ? void 0 : callback(true);
1000
992
  } catch (e) {
1001
- actions.setAuthState({
1002
- userIpData: {
1003
- loading: false
1004
- }
1005
- });
1006
993
  callback == null ? void 0 : callback(false);
1007
994
  }
1008
995
  };
@@ -245,8 +245,8 @@ export default ((store, api, sharedActions) => {
245
245
  error: null
246
246
  });
247
247
  try {
248
- var _store$auth$userIpDat, _store$auth$userIpDat2;
249
- const userIp = (_store$auth$userIpDat = (_store$auth$userIpDat2 = store.auth.userIpData) == null ? void 0 : _store$auth$userIpDat2.ip) != null ? _store$auth$userIpDat : '';
248
+ var _store$auth$userIp;
249
+ const userIp = (_store$auth$userIp = store.auth.userIp) != null ? _store$auth$userIp : '';
250
250
  await Promise.all([api.auth.createIPRestriction({
251
251
  ip: userIp,
252
252
  isActive: true,
package/auth/index.d.ts CHANGED
@@ -1,37 +1,4 @@
1
1
  import { DeepPartial, FronteggActions, FronteggState, RestApi } from '../interfaces';
2
- import { AuthState, SingleErrorByRequestDataPayload, User } from './interfaces';
3
- import { buildAcceptInvitationActions } from './AcceptInvitationState';
4
- import { buildAccountSettingsActions } from './AccountSettingsState';
5
- import { buildActivateAccountActions } from './ActivateAccountState';
6
- import { buildUnlockAccountActions } from './UnlockAccountState';
7
- import { buildApiTokensActions } from './ApiTokensState';
8
- import { buildApplicationsActions } from './ApplicationsState';
9
- import { buildCustomLoginActions } from './CustomLoginState';
10
- import { buildForgotPasswordActions } from './ForgotPasswordState';
11
- import { buildGroupsActions } from './GroupsState';
12
- import { buildGroupsDialogsActions } from './GroupsDialogsState';
13
- import { buildImpersonateActions } from './ImpersonateState';
14
- import { buildLoginActions } from './LoginState';
15
- import { buildMfaActions } from './MfaState';
16
- import { buildAllAccountsActions, buildAllAccountsDialogActions } from './MSP';
17
- import { buildPasskeysActions } from './PasskeysState';
18
- import { buildProfileActions } from './ProfileState';
19
- import { buildProvisioningActions } from './ProvisioningState';
20
- import { buildResetPhoneNumberActions } from './ResetPhoneNumberState';
21
- import { buildRolesActions } from './RolesState';
22
- import { buildRestrictionsActions } from './Security/RestrictionsState';
23
- import { buildSecurityCenterActions } from './Security/SecurityCenterState';
24
- import { buildSecurityPolicyActions } from './Security/SecurityPolicyState';
25
- import { buildSessionsPolicyActions } from './Security/SessionsPolicyState';
26
- import { buildSessionsActions } from './SessionsState';
27
- import { buildSignUpActions } from './SignUpState';
28
- import { buildSmsActions } from './SmsState';
29
- import { buildSocialLoginActions } from './SocialLoginState';
30
- import { buildSSOActions } from './SSOState';
31
- import { buildStepUpActions } from './StepUpState';
32
- import { buildTeamActions } from './TeamState';
33
- import { buildTenantsActions } from './TenantsState';
34
- import { buildEntitlementsActions } from './Entitlements';
35
2
  export * from './AcceptInvitationState/interfaces';
36
3
  export * from './AccountSettingsState/interfaces';
37
4
  export * from './ActivateAccountState/interfaces';
@@ -66,6 +33,40 @@ export * from './StepUpState/interfaces';
66
33
  export * from './TeamState/interfaces';
67
34
  export * from './TenantsState/interfaces';
68
35
  export * from './interfaces';
36
+ import { AuthState, User, SingleErrorByRequestDataPayload } from './interfaces';
37
+ import { buildAcceptInvitationActions } from './AcceptInvitationState';
38
+ import { buildAccountSettingsActions } from './AccountSettingsState';
39
+ import { buildActivateAccountActions } from './ActivateAccountState';
40
+ import { buildUnlockAccountActions } from './UnlockAccountState';
41
+ import { buildApiTokensActions } from './ApiTokensState';
42
+ import { buildApplicationsActions } from './ApplicationsState';
43
+ import { buildCustomLoginActions } from './CustomLoginState';
44
+ import { buildForgotPasswordActions } from './ForgotPasswordState';
45
+ import { buildGroupsActions } from './GroupsState';
46
+ import { buildGroupsDialogsActions } from './GroupsDialogsState';
47
+ import { buildImpersonateActions } from './ImpersonateState';
48
+ import { buildLoginActions } from './LoginState';
49
+ import { buildMfaActions } from './MfaState';
50
+ import { buildAllAccountsActions } from './MSP';
51
+ import { buildAllAccountsDialogActions } from './MSP';
52
+ import { buildPasskeysActions } from './PasskeysState';
53
+ import { buildProfileActions } from './ProfileState';
54
+ import { buildProvisioningActions } from './ProvisioningState';
55
+ import { buildResetPhoneNumberActions } from './ResetPhoneNumberState';
56
+ import { buildRolesActions } from './RolesState';
57
+ import { buildRestrictionsActions } from './Security/RestrictionsState';
58
+ import { buildSecurityCenterActions } from './Security/SecurityCenterState';
59
+ import { buildSecurityPolicyActions } from './Security/SecurityPolicyState';
60
+ import { buildSessionsPolicyActions } from './Security/SessionsPolicyState';
61
+ import { buildSessionsActions } from './SessionsState';
62
+ import { buildSignUpActions } from './SignUpState';
63
+ import { buildSmsActions } from './SmsState';
64
+ import { buildSocialLoginActions } from './SocialLoginState';
65
+ import { buildSSOActions } from './SSOState';
66
+ import { buildStepUpActions } from './StepUpState';
67
+ import { buildTeamActions } from './TeamState';
68
+ import { buildTenantsActions } from './TenantsState';
69
+ import { buildEntitlementsActions } from './Entitlements';
69
70
  export declare const createAuthState: (_overrideState?: DeepPartial<AuthState>) => AuthState;
70
71
  export declare const buildAuthActions: (store: FronteggState, api: RestApi, actions: FronteggActions, snapshotAuthState: AuthState) => [AuthActions, AuthStateActions];
71
72
  export type AcceptInvitationActions = ReturnType<typeof buildAcceptInvitationActions>;
package/auth/index.js CHANGED
@@ -2,41 +2,6 @@ import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
3
3
  const _excluded = ["routes"],
4
4
  _excluded2 = ["requestName"];
5
- import { buildAcceptInvitationActions, createAcceptInvitationState } from './AcceptInvitationState';
6
- import { buildAccountSettingsActions, createAccountSettingsState } from './AccountSettingsState';
7
- import { buildActivateAccountActions, createActivateAccountState } from './ActivateAccountState';
8
- import { buildUnlockAccountActions, createUnlockAccountState } from './UnlockAccountState';
9
- import { buildApiTokensActions, createApiTokensState } from './ApiTokensState';
10
- import { buildApplicationsActions, createApplicationsState } from './ApplicationsState';
11
- import { buildCustomLoginActions, createCustomLoginState } from './CustomLoginState';
12
- import { buildForgotPasswordActions, createForgotPasswordState } from './ForgotPasswordState';
13
- import { buildGroupsActions, createGroupsState } from './GroupsState';
14
- import { buildGroupsDialogsActions, createGroupsDialogsState } from './GroupsDialogsState';
15
- import { buildImpersonateActions, createImpersonateState } from './ImpersonateState';
16
- import { buildLoginActions, createLoginState } from './LoginState';
17
- import { buildMfaActions, createMfaState } from './MfaState';
18
- import { buildAllAccountsActions, buildAllAccountsDialogActions, createAllAccountsDialogState, createAllAccountsState } from './MSP';
19
- import { buildPasskeysActions, createPasskeysState } from './PasskeysState';
20
- import { buildProfileActions, createProfileState } from './ProfileState';
21
- import { buildProvisioningActions, createProvisioningState } from './ProvisioningState';
22
- import { buildResetPhoneNumberActions, createResetPhoneNumberState } from './ResetPhoneNumberState';
23
- import { buildRolesActions, createRolesState } from './RolesState';
24
- import { buildRestrictionsActions, createRestrictionsState } from './Security/RestrictionsState';
25
- import { buildSecurityCenterActions, createSecurityCenterState } from './Security/SecurityCenterState';
26
- import { buildSecurityPolicyActions, createSecurityPolicyState } from './Security/SecurityPolicyState';
27
- import { buildSessionsPolicyActions, createSessionsPolicyState } from './Security/SessionsPolicyState';
28
- import { buildSessionsActions, createSessionsState } from './SessionsState';
29
- import { buildSignUpActions, createSignUpState } from './SignUpState';
30
- import { buildSmsActions, createSmsState } from './SmsState';
31
- import { buildSocialLoginActions, createSocialLoginState } from './SocialLoginState';
32
- import { buildSSOActions, createSSOState } from './SSOState';
33
- import { buildStepUpActions, createStepUpState } from './StepUpState';
34
- import { buildTeamActions, createTeamState } from './TeamState';
35
- import { buildTenantsActions, createTenantsState } from './TenantsState';
36
- import { defaultFronteggRoutes } from './LoginState/consts';
37
- import { deepResetState, isProxy } from '../helpers';
38
- import { buildEntitlementsActions } from './Entitlements';
39
- import { createProxy } from '../toolkit/proxy';
40
5
  export * from './AcceptInvitationState/interfaces';
41
6
  export * from './AccountSettingsState/interfaces';
42
7
  export * from './ActivateAccountState/interfaces';
@@ -71,6 +36,42 @@ export * from './StepUpState/interfaces';
71
36
  export * from './TeamState/interfaces';
72
37
  export * from './TenantsState/interfaces';
73
38
  export * from './interfaces';
39
+ import { createAcceptInvitationState, buildAcceptInvitationActions } from './AcceptInvitationState';
40
+ import { createAccountSettingsState, buildAccountSettingsActions } from './AccountSettingsState';
41
+ import { createActivateAccountState, buildActivateAccountActions } from './ActivateAccountState';
42
+ import { createUnlockAccountState, buildUnlockAccountActions } from './UnlockAccountState';
43
+ import { createApiTokensState, buildApiTokensActions } from './ApiTokensState';
44
+ import { createApplicationsState, buildApplicationsActions } from './ApplicationsState';
45
+ import { createCustomLoginState, buildCustomLoginActions } from './CustomLoginState';
46
+ import { buildForgotPasswordActions, createForgotPasswordState } from './ForgotPasswordState';
47
+ import { createGroupsState, buildGroupsActions } from './GroupsState';
48
+ import { createGroupsDialogsState, buildGroupsDialogsActions } from './GroupsDialogsState';
49
+ import { createImpersonateState, buildImpersonateActions } from './ImpersonateState';
50
+ import { createLoginState, buildLoginActions } from './LoginState';
51
+ import { createMfaState, buildMfaActions } from './MfaState';
52
+ import { createAllAccountsState, buildAllAccountsActions } from './MSP';
53
+ import { createAllAccountsDialogState, buildAllAccountsDialogActions } from './MSP';
54
+ import { createPasskeysState, buildPasskeysActions } from './PasskeysState';
55
+ import { createProfileState, buildProfileActions } from './ProfileState';
56
+ import { createProvisioningState, buildProvisioningActions } from './ProvisioningState';
57
+ import { createResetPhoneNumberState, buildResetPhoneNumberActions } from './ResetPhoneNumberState';
58
+ import { createRolesState, buildRolesActions } from './RolesState';
59
+ import { createRestrictionsState, buildRestrictionsActions } from './Security/RestrictionsState';
60
+ import { createSecurityCenterState, buildSecurityCenterActions } from './Security/SecurityCenterState';
61
+ import { createSecurityPolicyState, buildSecurityPolicyActions } from './Security/SecurityPolicyState';
62
+ import { createSessionsPolicyState, buildSessionsPolicyActions } from './Security/SessionsPolicyState';
63
+ import { createSessionsState, buildSessionsActions } from './SessionsState';
64
+ import { createSignUpState, buildSignUpActions } from './SignUpState';
65
+ import { createSmsState, buildSmsActions } from './SmsState';
66
+ import { createSocialLoginState, buildSocialLoginActions } from './SocialLoginState';
67
+ import { createSSOState, buildSSOActions } from './SSOState';
68
+ import { createStepUpState, buildStepUpActions } from './StepUpState';
69
+ import { createTeamState, buildTeamActions } from './TeamState';
70
+ import { createTenantsState, buildTenantsActions } from './TenantsState';
71
+ import { defaultFronteggRoutes } from './LoginState/consts';
72
+ import { deepResetState, isProxy } from '../helpers';
73
+ import { buildEntitlementsActions } from './Entitlements';
74
+ import { createProxy } from '../toolkit/proxy';
74
75
  export const createAuthState = _overrideState => {
75
76
  const _ref = _overrideState != null ? _overrideState : {},
76
77
  {
@@ -86,9 +87,7 @@ export const createAuthState = _overrideState => {
86
87
  user: null,
87
88
  error: undefined,
88
89
  errorByRequest: {},
89
- userIpData: {
90
- loading: false
91
- }
90
+ userIp: undefined
92
91
  }, overrideState, {
93
92
  // nested states
94
93
  acceptInvitationState: createAcceptInvitationState(overrideState == null ? void 0 : overrideState.acceptInvitationState),
@@ -47,18 +47,13 @@ export interface SingleErrorByRequestData {
47
47
  isError: boolean;
48
48
  traceId?: string;
49
49
  }
50
- interface UserIPData {
51
- ip?: string;
52
- countryCode?: string | null;
53
- loading?: boolean;
54
- }
55
50
  export type ErrorByRequest = Partial<Record<REQUEST_NAME, SingleErrorByRequestData>>;
56
51
  export interface AuthState extends Routes, PluginOptions {
57
52
  onRedirectTo: (path: string, opts?: RedirectOptions) => void;
58
53
  error?: any;
59
54
  errorByRequest: ErrorByRequest;
60
55
  isAuthenticated: boolean;
61
- userIpData?: UserIPData;
56
+ userIp?: string;
62
57
  isLoading: boolean;
63
58
  keepSessionAlive?: boolean;
64
59
  socialLoginOptions?: {
package/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license Frontegg v7.35.0-alpha.1
1
+ /** @license Frontegg v7.36.0-alpha.0
2
2
  *
3
3
  * This source code is licensed under the MIT license found in the
4
4
  * LICENSE file in the root directory of this source tree.
@@ -28,9 +28,7 @@ export default ((store, api, sharedActions) => {
28
28
  ip
29
29
  } = dummyIps[0];
30
30
  await actions.setAuthState({
31
- userIpData: {
32
- ip
33
- }
31
+ userIp: ip
34
32
  });
35
33
  callback == null ? void 0 : callback(true, ip);
36
34
  } catch (e) {
@@ -987,29 +987,14 @@ var _default = (store, api, sharedActions) => {
987
987
  callback
988
988
  } = payload;
989
989
  try {
990
- actions.setAuthState({
991
- userIpData: {
992
- loading: true
993
- }
994
- });
995
990
  const {
996
- ip,
997
- country_code
991
+ ip
998
992
  } = await api.metadata.getCurrentUserIpMetadata();
999
993
  actions.setAuthState({
1000
- userIpData: {
1001
- ip,
1002
- countryCode: country_code,
1003
- loading: false
1004
- }
994
+ userIp: ip
1005
995
  });
1006
996
  callback == null ? void 0 : callback(true);
1007
997
  } catch (e) {
1008
- actions.setAuthState({
1009
- userIpData: {
1010
- loading: false
1011
- }
1012
- });
1013
998
  callback == null ? void 0 : callback(false);
1014
999
  }
1015
1000
  };
@@ -252,8 +252,8 @@ var _default = (store, api, sharedActions) => {
252
252
  error: null
253
253
  });
254
254
  try {
255
- var _store$auth$userIpDat, _store$auth$userIpDat2;
256
- const userIp = (_store$auth$userIpDat = (_store$auth$userIpDat2 = store.auth.userIpData) == null ? void 0 : _store$auth$userIpDat2.ip) != null ? _store$auth$userIpDat : '';
255
+ var _store$auth$userIp;
256
+ const userIp = (_store$auth$userIp = store.auth.userIp) != null ? _store$auth$userIp : '';
257
257
  await Promise.all([api.auth.createIPRestriction({
258
258
  ip: userIp,
259
259
  isActive: true,
@@ -11,41 +11,6 @@ var _exportNames = {
11
11
  exports.createAuthState = exports.buildAuthActions = void 0;
12
12
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
13
13
  var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
14
- var _AcceptInvitationState = require("./AcceptInvitationState");
15
- var _AccountSettingsState = require("./AccountSettingsState");
16
- var _ActivateAccountState = require("./ActivateAccountState");
17
- var _UnlockAccountState = require("./UnlockAccountState");
18
- var _ApiTokensState = require("./ApiTokensState");
19
- var _ApplicationsState = require("./ApplicationsState");
20
- var _CustomLoginState = require("./CustomLoginState");
21
- var _ForgotPasswordState = require("./ForgotPasswordState");
22
- var _GroupsState = require("./GroupsState");
23
- var _GroupsDialogsState = require("./GroupsDialogsState");
24
- var _ImpersonateState = require("./ImpersonateState");
25
- var _LoginState = require("./LoginState");
26
- var _MfaState = require("./MfaState");
27
- var _MSP = require("./MSP");
28
- var _PasskeysState = require("./PasskeysState");
29
- var _ProfileState = require("./ProfileState");
30
- var _ProvisioningState = require("./ProvisioningState");
31
- var _ResetPhoneNumberState = require("./ResetPhoneNumberState");
32
- var _RolesState = require("./RolesState");
33
- var _RestrictionsState = require("./Security/RestrictionsState");
34
- var _SecurityCenterState = require("./Security/SecurityCenterState");
35
- var _SecurityPolicyState = require("./Security/SecurityPolicyState");
36
- var _SessionsPolicyState = require("./Security/SessionsPolicyState");
37
- var _SessionsState = require("./SessionsState");
38
- var _SignUpState = require("./SignUpState");
39
- var _SmsState = require("./SmsState");
40
- var _SocialLoginState = require("./SocialLoginState");
41
- var _SSOState = require("./SSOState");
42
- var _StepUpState = require("./StepUpState");
43
- var _TeamState = require("./TeamState");
44
- var _TenantsState = require("./TenantsState");
45
- var _consts = require("./LoginState/consts");
46
- var _helpers = require("../helpers");
47
- var _Entitlements = require("./Entitlements");
48
- var _proxy = require("../toolkit/proxy");
49
14
  var _interfaces = require("./AcceptInvitationState/interfaces");
50
15
  Object.keys(_interfaces).forEach(function (key) {
51
16
  if (key === "default" || key === "__esModule") return;
@@ -142,15 +107,15 @@ Object.keys(_interfaces8).forEach(function (key) {
142
107
  }
143
108
  });
144
109
  });
145
- var _helpers2 = require("./Entitlements/helpers");
146
- Object.keys(_helpers2).forEach(function (key) {
110
+ var _helpers = require("./Entitlements/helpers");
111
+ Object.keys(_helpers).forEach(function (key) {
147
112
  if (key === "default" || key === "__esModule") return;
148
113
  if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
149
- if (key in exports && exports[key] === _helpers2[key]) return;
114
+ if (key in exports && exports[key] === _helpers[key]) return;
150
115
  Object.defineProperty(exports, key, {
151
116
  enumerable: true,
152
117
  get: function () {
153
- return _helpers2[key];
118
+ return _helpers[key];
154
119
  }
155
120
  });
156
121
  });
@@ -454,6 +419,41 @@ Object.keys(_interfaces33).forEach(function (key) {
454
419
  }
455
420
  });
456
421
  });
422
+ var _AcceptInvitationState = require("./AcceptInvitationState");
423
+ var _AccountSettingsState = require("./AccountSettingsState");
424
+ var _ActivateAccountState = require("./ActivateAccountState");
425
+ var _UnlockAccountState = require("./UnlockAccountState");
426
+ var _ApiTokensState = require("./ApiTokensState");
427
+ var _ApplicationsState = require("./ApplicationsState");
428
+ var _CustomLoginState = require("./CustomLoginState");
429
+ var _ForgotPasswordState = require("./ForgotPasswordState");
430
+ var _GroupsState = require("./GroupsState");
431
+ var _GroupsDialogsState = require("./GroupsDialogsState");
432
+ var _ImpersonateState = require("./ImpersonateState");
433
+ var _LoginState = require("./LoginState");
434
+ var _MfaState = require("./MfaState");
435
+ var _MSP = require("./MSP");
436
+ var _PasskeysState = require("./PasskeysState");
437
+ var _ProfileState = require("./ProfileState");
438
+ var _ProvisioningState = require("./ProvisioningState");
439
+ var _ResetPhoneNumberState = require("./ResetPhoneNumberState");
440
+ var _RolesState = require("./RolesState");
441
+ var _RestrictionsState = require("./Security/RestrictionsState");
442
+ var _SecurityCenterState = require("./Security/SecurityCenterState");
443
+ var _SecurityPolicyState = require("./Security/SecurityPolicyState");
444
+ var _SessionsPolicyState = require("./Security/SessionsPolicyState");
445
+ var _SessionsState = require("./SessionsState");
446
+ var _SignUpState = require("./SignUpState");
447
+ var _SmsState = require("./SmsState");
448
+ var _SocialLoginState = require("./SocialLoginState");
449
+ var _SSOState = require("./SSOState");
450
+ var _StepUpState = require("./StepUpState");
451
+ var _TeamState = require("./TeamState");
452
+ var _TenantsState = require("./TenantsState");
453
+ var _consts = require("./LoginState/consts");
454
+ var _helpers2 = require("../helpers");
455
+ var _Entitlements = require("./Entitlements");
456
+ var _proxy = require("../toolkit/proxy");
457
457
  const _excluded = ["routes"],
458
458
  _excluded2 = ["requestName"];
459
459
  const createAuthState = _overrideState => {
@@ -471,9 +471,7 @@ const createAuthState = _overrideState => {
471
471
  user: null,
472
472
  error: undefined,
473
473
  errorByRequest: {},
474
- userIpData: {
475
- loading: false
476
- }
474
+ userIp: undefined
477
475
  }, overrideState, {
478
476
  // nested states
479
477
  acceptInvitationState: (0, _AcceptInvitationState.createAcceptInvitationState)(overrideState == null ? void 0 : overrideState.acceptInvitationState),
@@ -515,7 +513,7 @@ const buildAuthActions = (store, api, actions, snapshotAuthState) => {
515
513
  const setAuthState = state => {
516
514
  Object.keys(state).forEach(key => {
517
515
  const authKey = key;
518
- if ((0, _helpers.isProxy)(store.auth[authKey])) {
516
+ if ((0, _helpers2.isProxy)(store.auth[authKey])) {
519
517
  Object.assign(store.auth[authKey], state[authKey]);
520
518
  } else {
521
519
  store.auth[authKey] = state[authKey];
@@ -523,7 +521,7 @@ const buildAuthActions = (store, api, actions, snapshotAuthState) => {
523
521
  });
524
522
  };
525
523
  const resetAuthState = () => {
526
- (0, _helpers.deepResetState)(store, ['auth'], snapshotAuthState);
524
+ (0, _helpers2.deepResetState)(store, ['auth'], snapshotAuthState);
527
525
  };
528
526
  const setUser = user => {
529
527
  setAuthState({
package/node/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license Frontegg v7.35.0-alpha.1
1
+ /** @license Frontegg v7.36.0-alpha.0
2
2
  *
3
3
  * This source code is licensed under the MIT license found in the
4
4
  * LICENSE file in the root directory of this source tree.
@@ -34,9 +34,7 @@ var _default = (store, api, sharedActions) => {
34
34
  ip
35
35
  } = _dummy.dummyIps[0];
36
36
  await actions.setAuthState({
37
- userIpData: {
38
- ip
39
- }
37
+ userIp: ip
40
38
  });
41
39
  callback == null ? void 0 : callback(true, ip);
42
40
  } catch (e) {
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@frontegg/redux-store",
3
- "version": "7.35.0-alpha.1",
3
+ "version": "7.36.0-alpha.0",
4
4
  "main": "./node/index.js",
5
5
  "license": "MIT",
6
6
  "author": "Frontegg LTD",
7
7
  "dependencies": {
8
8
  "@babel/runtime": "^7.18.6",
9
9
  "@frontegg/entitlements-javascript-commons": "1.1.2",
10
- "@frontegg/rest-api": "7.35.0-alpha.1",
10
+ "@frontegg/rest-api": "7.36.0-alpha.0",
11
11
  "fast-deep-equal": "3.1.3",
12
12
  "get-value": "^3.0.1",
13
13
  "proxy-compare": "^3.0.0",