@frontegg/redux-store 7.57.0-alpha.6 → 7.58.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.
Files changed (32) hide show
  1. package/auth/LoginState/actions/index.js +43 -61
  2. package/auth/LoginState/interfaces.d.ts +0 -6
  3. package/auth/LoginState/interfaces.js +0 -2
  4. package/auth/helpers.d.ts +0 -1
  5. package/auth/helpers.js +4 -14
  6. package/auth/index.d.ts +1 -5
  7. package/auth/index.js +0 -5
  8. package/auth/interfaces.d.ts +0 -5
  9. package/index.js +1 -1
  10. package/mocks/auth-mocks/index.js +1 -4
  11. package/node/auth/LoginState/actions/index.js +42 -60
  12. package/node/auth/LoginState/interfaces.js +0 -2
  13. package/node/auth/helpers.js +5 -17
  14. package/node/auth/index.js +24 -40
  15. package/node/index.js +1 -1
  16. package/node/mocks/auth-mocks/index.js +1 -4
  17. package/package.json +2 -2
  18. package/auth/PasswordRotationState/actions.d.ts +0 -6
  19. package/auth/PasswordRotationState/actions.js +0 -13
  20. package/auth/PasswordRotationState/index.d.ts +0 -3
  21. package/auth/PasswordRotationState/index.js +0 -3
  22. package/auth/PasswordRotationState/interfaces.d.ts +0 -7
  23. package/auth/PasswordRotationState/interfaces.js +0 -5
  24. package/auth/PasswordRotationState/state.d.ts +0 -4
  25. package/auth/PasswordRotationState/state.js +0 -6
  26. package/mocks/auth-mocks/passwordRotationActions.mocks.d.ts +0 -6
  27. package/mocks/auth-mocks/passwordRotationActions.mocks.js +0 -9
  28. package/node/auth/PasswordRotationState/actions.js +0 -20
  29. package/node/auth/PasswordRotationState/index.js +0 -20
  30. package/node/auth/PasswordRotationState/interfaces.js +0 -12
  31. package/node/auth/PasswordRotationState/state.js +0 -14
  32. package/node/mocks/auth-mocks/passwordRotationActions.mocks.js +0 -16
@@ -31,7 +31,7 @@ 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 { isMfaRequired, isResetPasswordRequired } from '../../helpers';
34
+ import { isMfaRequired } from '../../helpers';
35
35
  import { MFAStep } from '../../MfaState/interfaces';
36
36
  import { SamlVendors } from '../../SSOState/interfaces';
37
37
  import { DEFAULT_RETRY_CONFIG } from '../../../constants';
@@ -465,68 +465,50 @@ export default ((store, api, sharedActions) => {
465
465
  preserveQueryParams: true
466
466
  });
467
467
  } else {
468
- const [securityCenterLoginFlows, passwordRotationFlagEnabled] = await actions.getFeatureFlags(['security-center-show-login-flows', 'password-rotation']);
469
- if (passwordRotationFlagEnabled && isResetPasswordRequired(user, store.root.appName)) {
470
- console.log('🚀 ~ reset password Required', user);
471
- setLoginState({
472
- step: LoginStep.passwordRotationExpired,
468
+ const loginState = store.auth.loginState;
469
+ const isAuthenticated = !!user.accessToken;
470
+ if (user.id) {
471
+ localStorage.setItem('userId', user.id);
472
+ }
473
+ actions.afterAuthenticationStateUpdate({
474
+ user,
475
+ tenants,
476
+ activeTenant
477
+ }, {
478
+ loginState: {
479
+ flow: loginState.flow,
480
+ quickLoginToRegister: loginState.quickLoginToRegister,
481
+ email,
473
482
  loading: false,
474
- resetPasswordToken: user.resetPasswordToken,
475
- userId: user.userId
476
- });
477
- } else {
478
- const loginState = store.auth.loginState;
479
- const isAuthenticated = !!user.accessToken;
480
- if (user.id) {
481
- localStorage.setItem('userId', user.id);
482
- }
483
- actions.afterAuthenticationStateUpdate({
484
- user,
483
+ error: undefined,
484
+ mfaToken: user.mfaToken,
485
+ step: loginState.flow === LoginFlow.Login ? LoginStep.success : loginState.step,
485
486
  tenants,
486
- activeTenant
487
- }, {
488
- loginState: {
489
- flow: loginState.flow,
490
- quickLoginToRegister: loginState.quickLoginToRegister,
491
- email,
492
- loading: false,
493
- error: undefined,
494
- mfaToken: user.mfaToken,
495
- step: loginState.flow === LoginFlow.Login ? LoginStep.success : loginState.step,
496
- tenants,
497
- tenantsLoading: true,
498
- isBreachedPassword: user.isBreachedPassword
499
- },
500
- isAuthenticated
501
- });
502
- if (loginState.flow === LoginFlow.Login) {
503
- if (securityCenterLoginFlows && user.isBreachedPassword && !isAuthenticated) {
504
- setLoginState({
505
- step: LoginStep.breachedPassword,
506
- loading: false
507
- });
508
- } else {
509
- if (isAuthenticated) {
510
- const shouldShowPasswordRotationPrompt = user.passwordExpiresIn && user.notificationPeriod && user.passwordExpiresIn <= user.notificationPeriod;
511
- if (passwordRotationFlagEnabled && shouldShowPasswordRotationPrompt) {
512
- setLoginState({
513
- step: LoginStep.passwordRotationNotification,
514
- loading: false
515
- });
516
- } else {
517
- const shouldShowPromptPasskeys = await actions.__shouldShowPromptPasskeys();
518
- if (shouldShowPromptPasskeys) {
519
- setLoginState({
520
- step: LoginStep.promptPasskeys,
521
- loading: false
522
- });
523
- onRedirectTo(routes.loginUrl, {
524
- preserveQueryParams: true
525
- });
526
- } else {
527
- await actions.afterAuthNavigation();
528
- }
529
- }
487
+ tenantsLoading: true,
488
+ isBreachedPassword: user.isBreachedPassword
489
+ },
490
+ isAuthenticated
491
+ });
492
+ const [securityCenterLoginFlows] = await actions.getFeatureFlags(['security-center-show-login-flows']);
493
+ if (loginState.flow === LoginFlow.Login) {
494
+ if (securityCenterLoginFlows && user.isBreachedPassword && !isAuthenticated) {
495
+ setLoginState({
496
+ step: LoginStep.breachedPassword,
497
+ loading: false
498
+ });
499
+ } else {
500
+ if (isAuthenticated) {
501
+ const shouldShowPrompt = await actions.__shouldShowPromptPasskeys();
502
+ if (shouldShowPrompt) {
503
+ setLoginState({
504
+ step: LoginStep.promptPasskeys,
505
+ loading: false
506
+ });
507
+ onRedirectTo(routes.loginUrl, {
508
+ preserveQueryParams: true
509
+ });
510
+ } else {
511
+ await actions.afterAuthNavigation();
530
512
  }
531
513
  }
532
514
  }
@@ -17,8 +17,6 @@ export declare enum LoginStep {
17
17
  'promptPasskeys' = "promptPasskeys",
18
18
  'breachedPassword' = "breachedPassword",
19
19
  'breachedPasswordSuccess' = "breachedPasswordSuccess",
20
- 'passwordRotationExpired' = "passwordRotationExpired",
21
- 'passwordRotationNotification' = "passwordRotationNotification",
22
20
  'magicLinkPostLoginSuccess' = "magicLinkPostLoginSuccess"
23
21
  }
24
22
  export declare enum LoginFlow {
@@ -51,10 +49,6 @@ export interface LoginState {
51
49
  quickLoginToRegister?: QuickLoginStrategy;
52
50
  changePhoneId?: string;
53
51
  isBreachedPassword?: boolean;
54
- resetPasswordToken?: string;
55
- passwordExpiresIn?: number;
56
- notificationPeriod?: number;
57
- userId?: string;
58
52
  }
59
53
  export interface HostedLoginCallback {
60
54
  code: string;
@@ -16,8 +16,6 @@ export let LoginStep;
16
16
  LoginStep["promptPasskeys"] = "promptPasskeys";
17
17
  LoginStep["breachedPassword"] = "breachedPassword";
18
18
  LoginStep["breachedPasswordSuccess"] = "breachedPasswordSuccess";
19
- LoginStep["passwordRotationExpired"] = "passwordRotationExpired";
20
- LoginStep["passwordRotationNotification"] = "passwordRotationNotification";
21
19
  LoginStep["magicLinkPostLoginSuccess"] = "magicLinkPostLoginSuccess";
22
20
  })(LoginStep || (LoginStep = {}));
23
21
  export let LoginFlow;
package/auth/helpers.d.ts CHANGED
@@ -5,7 +5,6 @@ export * from './LoginState/helpers';
5
5
  export * from './StepUpState/helpers';
6
6
  export * from './Entitlements/helpers';
7
7
  export declare const isMfaRequired: (user: ILoginResponse, appName: string) => boolean;
8
- export declare const isResetPasswordRequired: (user: ILoginResponse, appName: string) => boolean;
9
8
  export declare const mapMetaDataObjectToActions: (obj: any, path?: string[]) => CommitChangeDto[];
10
9
  export declare const getUri: (urlStrategy: FronteggState["root"]["urlStrategy"]) => string;
11
10
  export declare const extractPhoneNumber: ({ phoneNumber, ...rest }: ISignUpUser) => {
package/auth/helpers.js CHANGED
@@ -13,21 +13,11 @@ export const isMfaRequired = (user, appName) => {
13
13
  contextHolder.setAccessToken(null);
14
14
  contextHolder.setUser(null);
15
15
  return true;
16
+ } else {
17
+ contextHolder.setAccessToken(user.accessToken);
18
+ contextHolder.setUser(user);
19
+ return false;
16
20
  }
17
- contextHolder.setAccessToken(user.accessToken);
18
- contextHolder.setUser(user);
19
- return false;
20
- };
21
- export const isResetPasswordRequired = (user, appName) => {
22
- const contextHolder = ContextHolder.for(appName);
23
- if (user.resetPasswordToken) {
24
- contextHolder.setAccessToken(null);
25
- console.log('resetPasswordToken: ', user.resetPasswordToken);
26
- return true;
27
- }
28
- contextHolder.setAccessToken(user.accessToken);
29
- contextHolder.setUser(user);
30
- return false;
31
21
  };
32
22
  export const mapMetaDataObjectToActions = (obj, path = []) => {
33
23
  return Object.entries(obj).reduce((acc, [key, value]) => {
package/auth/index.d.ts CHANGED
@@ -8,7 +8,6 @@ import { buildApiTokensActions } from './ApiTokensState';
8
8
  import { buildApplicationsActions } from './ApplicationsState';
9
9
  import { buildCustomLoginActions } from './CustomLoginState';
10
10
  import { buildForgotPasswordActions } from './ForgotPasswordState';
11
- import { buildPasswordRotationActions } from './PasswordRotationState';
12
11
  import { buildGroupsActions } from './GroupsState';
13
12
  import { buildGroupsDialogsActions } from './GroupsDialogsState';
14
13
  import { buildImpersonateActions } from './ImpersonateState';
@@ -43,7 +42,6 @@ export * from './CustomLoginState/interfaces';
43
42
  export * from './Entitlements/interfaces';
44
43
  export * from './Entitlements/helpers';
45
44
  export * from './ForgotPasswordState/interfaces';
46
- export * from './PasswordRotationState/interfaces';
47
45
  export * from './GroupsState/interfaces';
48
46
  export * from './GroupsDialogsState/interfaces';
49
47
  export * from './ImpersonateState/interfaces';
@@ -79,7 +77,6 @@ export type ApplicationsActions = ReturnType<typeof buildApplicationsActions>;
79
77
  export type CustomLoginActions = ReturnType<typeof buildCustomLoginActions>;
80
78
  export type EntitlementsActions = ReturnType<typeof buildEntitlementsActions>;
81
79
  export type ForgotPasswordActions = ReturnType<typeof buildForgotPasswordActions>;
82
- export type PasswordRotationActions = ReturnType<typeof buildPasswordRotationActions>;
83
80
  export type GroupsActions = ReturnType<typeof buildGroupsActions>;
84
81
  export type GroupsDialogsActions = ReturnType<typeof buildGroupsDialogsActions>;
85
82
  export type ImpersonateActions = ReturnType<typeof buildImpersonateActions>;
@@ -114,7 +111,6 @@ export type AuthStateActions = {
114
111
  customLoginActions: CustomLoginActions;
115
112
  entitlementsActions: EntitlementsActions;
116
113
  forgotPasswordActions: ForgotPasswordActions;
117
- passwordRotationActions: PasswordRotationActions;
118
114
  groupsActions: GroupsActions;
119
115
  groupsDialogsActions: GroupsDialogsActions;
120
116
  impersonateActions: ImpersonateActions;
@@ -147,4 +143,4 @@ export type AuthActions = {
147
143
  setErrorByRequestName: (payload: SingleErrorByRequestDataPayload) => void;
148
144
  resetAuthState: () => void;
149
145
  setUser: (user: User | null) => void;
150
- } & AcceptInvitationActions & AccountSettingsActions & UnlockAccountActions & ActivateAccountActions & ApiTokensActions & ApplicationsActions & CustomLoginActions & EntitlementsActions & ForgotPasswordActions & PasswordRotationActions & GroupsActions & GroupsDialogsActions & ImpersonateActions & LoginActions & MfaActions & AllAccountsActions & AllAccountsDialogActions & PasskeysActions & ProfileActions & ProvisioningActions & ResetPhoneNumberActions & RolesActions & RestrictionsActions & SecurityCenterActions & SecurityPolicyActions & SessionsPolicyActions & SessionsActions & SignUpActions & SmsActions & SocialLoginActions & SSOActions & StepUpActions & TeamActions & TenantsActions;
146
+ } & AcceptInvitationActions & AccountSettingsActions & UnlockAccountActions & ActivateAccountActions & ApiTokensActions & ApplicationsActions & CustomLoginActions & EntitlementsActions & ForgotPasswordActions & GroupsActions & GroupsDialogsActions & ImpersonateActions & LoginActions & MfaActions & AllAccountsActions & AllAccountsDialogActions & PasskeysActions & ProfileActions & ProvisioningActions & ResetPhoneNumberActions & RolesActions & RestrictionsActions & SecurityCenterActions & SecurityPolicyActions & SessionsPolicyActions & SessionsActions & SignUpActions & SmsActions & SocialLoginActions & SSOActions & StepUpActions & TeamActions & TenantsActions;
package/auth/index.js CHANGED
@@ -10,7 +10,6 @@ import { buildApiTokensActions, createApiTokensState } from './ApiTokensState';
10
10
  import { buildApplicationsActions, createApplicationsState } from './ApplicationsState';
11
11
  import { buildCustomLoginActions, createCustomLoginState } from './CustomLoginState';
12
12
  import { buildForgotPasswordActions, createForgotPasswordState } from './ForgotPasswordState';
13
- import { buildPasswordRotationActions, createPasswordRotationState } from './PasswordRotationState';
14
13
  import { buildGroupsActions, createGroupsState } from './GroupsState';
15
14
  import { buildGroupsDialogsActions, createGroupsDialogsState } from './GroupsDialogsState';
16
15
  import { buildImpersonateActions, createImpersonateState } from './ImpersonateState';
@@ -48,7 +47,6 @@ export * from './CustomLoginState/interfaces';
48
47
  export * from './Entitlements/interfaces';
49
48
  export * from './Entitlements/helpers';
50
49
  export * from './ForgotPasswordState/interfaces';
51
- export * from './PasswordRotationState/interfaces';
52
50
  export * from './GroupsState/interfaces';
53
51
  export * from './GroupsDialogsState/interfaces';
54
52
  export * from './ImpersonateState/interfaces';
@@ -102,7 +100,6 @@ export const createAuthState = _overrideState => {
102
100
  applicationsState: createApplicationsState(overrideState == null ? void 0 : overrideState.applicationsState),
103
101
  customLoginState: createCustomLoginState(overrideState == null ? void 0 : overrideState.customLoginState),
104
102
  forgotPasswordState: createForgotPasswordState(overrideState == null ? void 0 : overrideState.forgotPasswordState),
105
- passwordRotationState: createPasswordRotationState(overrideState == null ? void 0 : overrideState.passwordRotationState),
106
103
  groupsState: createGroupsState(overrideState == null ? void 0 : overrideState.groupsState),
107
104
  groupsDialogsState: createGroupsDialogsState(overrideState == null ? void 0 : overrideState.groupsDialogsState),
108
105
  impersonateState: createImpersonateState(overrideState == null ? void 0 : overrideState.impersonateState),
@@ -168,7 +165,6 @@ export const buildAuthActions = (store, api, actions, snapshotAuthState) => {
168
165
  const customLoginActions = buildCustomLoginActions(store, api, actions);
169
166
  const entitlementsActions = buildEntitlementsActions(store, api, actions);
170
167
  const forgotPasswordActions = buildForgotPasswordActions(store, api, actions);
171
- const passwordRotationActions = buildPasswordRotationActions(store, api, actions);
172
168
  const groupsActions = buildGroupsActions(store, api, actions);
173
169
  const groupsDialogsActions = buildGroupsDialogsActions(store, api, actions);
174
170
  const impersonateActions = buildImpersonateActions(store, api, actions);
@@ -203,7 +199,6 @@ export const buildAuthActions = (store, api, actions, snapshotAuthState) => {
203
199
  customLoginActions,
204
200
  entitlementsActions,
205
201
  forgotPasswordActions,
206
- passwordRotationActions,
207
202
  groupsActions,
208
203
  groupsDialogsActions,
209
204
  impersonateActions,
@@ -30,7 +30,6 @@ import type { TenantsState } from './TenantsState/interfaces';
30
30
  import type { IAllAccountsDialogsState, IAllAccountsState } from './MSP/interfaces';
31
31
  import { ApplicationsState } from './ApplicationsState/interfaces';
32
32
  import { UnlockAccountState } from './UnlockAccountState/interfaces';
33
- import { PasswordRotationState } from '../toolkit';
34
33
  export declare enum REQUEST_NAME {
35
34
  LOAD_FEATURE_FLAGS = "LOAD_FEATURE_FLAGS,",
36
35
  LOAD_ADMIN_BOX_METADATA = "LOAD_ADMIN_BOX_METADATA,",
@@ -81,7 +80,6 @@ export interface AuthState extends Routes, PluginOptions {
81
80
  apiTokensState: ApiTokensState;
82
81
  customLoginState: CustomLoginState;
83
82
  forgotPasswordState: ForgotPasswordState;
84
- passwordRotationState: PasswordRotationState;
85
83
  groupsState: GroupsState;
86
84
  groupsDialogsState: GroupsDialogsState;
87
85
  impersonateState: ImpersonateState;
@@ -126,9 +124,6 @@ export interface User extends IUserProfile {
126
124
  amr?: string[];
127
125
  acr?: string;
128
126
  auth_time?: number;
129
- resetToken?: string;
130
- passwordExpiresIn?: number;
131
- notificationPeriod?: number;
132
127
  }
133
128
  export interface Routes {
134
129
  routes: AuthPageRoutes;
package/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license Frontegg v7.57.0-alpha.6
1
+ /** @license Frontegg v7.58.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.
@@ -12,7 +12,6 @@ import buildApplicationsActions from './applicationsActions.mocks';
12
12
  import buildCustomLoginActions from './customLoginActions.mocks';
13
13
  import buildEntitlementsActions from './entitlementsActions.mocks';
14
14
  import buildForgotPasswordActions from './forgotPasswordActions.mocks';
15
- import buildPasswordRotationActions from './passwordRotationActions.mocks';
16
15
  import buildGroupsActions from './groupsActions.mocks';
17
16
  /* contains reducers only no need to mock */
18
17
  import { buildGroupsDialogsActions } from '../../auth/GroupsDialogsState';
@@ -50,7 +49,6 @@ export const buildAuthActions = (store, api, actions, snapshotAuthState) => {
50
49
  const customLoginActions = buildCustomLoginActions(store, api, actions);
51
50
  const entitlementsActions = buildEntitlementsActions(store, api, actions);
52
51
  const forgotPasswordActions = buildForgotPasswordActions(store, api, actions);
53
- const passwordRotationActions = buildPasswordRotationActions(store, api, actions);
54
52
  const groupsActions = buildGroupsActions(store, api, actions);
55
53
  const groupsDialogsActions = buildGroupsDialogsActions(store, api, actions);
56
54
  const impersonateActions = buildImpersonateActions(store, api, actions);
@@ -85,7 +83,6 @@ export const buildAuthActions = (store, api, actions, snapshotAuthState) => {
85
83
  customLoginActions,
86
84
  entitlementsActions,
87
85
  forgotPasswordActions,
88
- passwordRotationActions,
89
86
  groupsActions,
90
87
  groupsDialogsActions,
91
88
  impersonateActions,
@@ -145,7 +142,7 @@ export const buildAuthActions = (store, api, actions, snapshotAuthState) => {
145
142
  setErrorByRequestName,
146
143
  resetAuthState,
147
144
  setUser
148
- }, acceptInvitationActions, accountSettingsActions, activateAccountActions, unlockAccountActions, allAccountsActions, allAccountsDialogActions, apiTokensActions, applicationsActions, customLoginActions, entitlementsActions, forgotPasswordActions, passwordRotationActions, groupsActions, groupsDialogsActions, impersonateActions, loginActions, mfaActions, passkeysActions, profileActions, provisioningActions, resetPhoneNumberActions, restrictionsActions, rolesActions, securityCenterActions, securityPolicyActions, sessionsActions, sessionsPolicyActions, signUpActions, smsActions, socialLoginActions, ssoActions, stepUpActions, teamActions, tenantsActions);
145
+ }, acceptInvitationActions, accountSettingsActions, activateAccountActions, unlockAccountActions, allAccountsActions, allAccountsDialogActions, apiTokensActions, applicationsActions, customLoginActions, entitlementsActions, forgotPasswordActions, groupsActions, groupsDialogsActions, impersonateActions, loginActions, mfaActions, passkeysActions, profileActions, provisioningActions, resetPhoneNumberActions, restrictionsActions, rolesActions, securityCenterActions, securityPolicyActions, sessionsActions, sessionsPolicyActions, signUpActions, smsActions, socialLoginActions, ssoActions, stepUpActions, teamActions, tenantsActions);
149
146
  return {
150
147
  authActions,
151
148
  authStateActions
@@ -472,68 +472,50 @@ var _default = (store, api, sharedActions) => {
472
472
  preserveQueryParams: true
473
473
  });
474
474
  } else {
475
- const [securityCenterLoginFlows, passwordRotationFlagEnabled] = await actions.getFeatureFlags(['security-center-show-login-flows', 'password-rotation']);
476
- if (passwordRotationFlagEnabled && (0, _helpers3.isResetPasswordRequired)(user, store.root.appName)) {
477
- console.log('🚀 ~ reset password Required', user);
478
- setLoginState({
479
- step: _interfaces.LoginStep.passwordRotationExpired,
475
+ const loginState = store.auth.loginState;
476
+ const isAuthenticated = !!user.accessToken;
477
+ if (user.id) {
478
+ localStorage.setItem('userId', user.id);
479
+ }
480
+ actions.afterAuthenticationStateUpdate({
481
+ user,
482
+ tenants,
483
+ activeTenant
484
+ }, {
485
+ loginState: {
486
+ flow: loginState.flow,
487
+ quickLoginToRegister: loginState.quickLoginToRegister,
488
+ email,
480
489
  loading: false,
481
- resetPasswordToken: user.resetPasswordToken,
482
- userId: user.userId
483
- });
484
- } else {
485
- const loginState = store.auth.loginState;
486
- const isAuthenticated = !!user.accessToken;
487
- if (user.id) {
488
- localStorage.setItem('userId', user.id);
489
- }
490
- actions.afterAuthenticationStateUpdate({
491
- user,
490
+ error: undefined,
491
+ mfaToken: user.mfaToken,
492
+ step: loginState.flow === _interfaces.LoginFlow.Login ? _interfaces.LoginStep.success : loginState.step,
492
493
  tenants,
493
- activeTenant
494
- }, {
495
- loginState: {
496
- flow: loginState.flow,
497
- quickLoginToRegister: loginState.quickLoginToRegister,
498
- email,
499
- loading: false,
500
- error: undefined,
501
- mfaToken: user.mfaToken,
502
- step: loginState.flow === _interfaces.LoginFlow.Login ? _interfaces.LoginStep.success : loginState.step,
503
- tenants,
504
- tenantsLoading: true,
505
- isBreachedPassword: user.isBreachedPassword
506
- },
507
- isAuthenticated
508
- });
509
- if (loginState.flow === _interfaces.LoginFlow.Login) {
510
- if (securityCenterLoginFlows && user.isBreachedPassword && !isAuthenticated) {
511
- setLoginState({
512
- step: _interfaces.LoginStep.breachedPassword,
513
- loading: false
514
- });
515
- } else {
516
- if (isAuthenticated) {
517
- const shouldShowPasswordRotationPrompt = user.passwordExpiresIn && user.notificationPeriod && user.passwordExpiresIn <= user.notificationPeriod;
518
- if (passwordRotationFlagEnabled && shouldShowPasswordRotationPrompt) {
519
- setLoginState({
520
- step: _interfaces.LoginStep.passwordRotationNotification,
521
- loading: false
522
- });
523
- } else {
524
- const shouldShowPromptPasskeys = await actions.__shouldShowPromptPasskeys();
525
- if (shouldShowPromptPasskeys) {
526
- setLoginState({
527
- step: _interfaces.LoginStep.promptPasskeys,
528
- loading: false
529
- });
530
- onRedirectTo(routes.loginUrl, {
531
- preserveQueryParams: true
532
- });
533
- } else {
534
- await actions.afterAuthNavigation();
535
- }
536
- }
494
+ tenantsLoading: true,
495
+ isBreachedPassword: user.isBreachedPassword
496
+ },
497
+ isAuthenticated
498
+ });
499
+ const [securityCenterLoginFlows] = await actions.getFeatureFlags(['security-center-show-login-flows']);
500
+ if (loginState.flow === _interfaces.LoginFlow.Login) {
501
+ if (securityCenterLoginFlows && user.isBreachedPassword && !isAuthenticated) {
502
+ setLoginState({
503
+ step: _interfaces.LoginStep.breachedPassword,
504
+ loading: false
505
+ });
506
+ } else {
507
+ if (isAuthenticated) {
508
+ const shouldShowPrompt = await actions.__shouldShowPromptPasskeys();
509
+ if (shouldShowPrompt) {
510
+ setLoginState({
511
+ step: _interfaces.LoginStep.promptPasskeys,
512
+ loading: false
513
+ });
514
+ onRedirectTo(routes.loginUrl, {
515
+ preserveQueryParams: true
516
+ });
517
+ } else {
518
+ await actions.afterAuthNavigation();
537
519
  }
538
520
  }
539
521
  }
@@ -29,8 +29,6 @@ exports.LoginStep = LoginStep;
29
29
  LoginStep["promptPasskeys"] = "promptPasskeys";
30
30
  LoginStep["breachedPassword"] = "breachedPassword";
31
31
  LoginStep["breachedPasswordSuccess"] = "breachedPasswordSuccess";
32
- LoginStep["passwordRotationExpired"] = "passwordRotationExpired";
33
- LoginStep["passwordRotationNotification"] = "passwordRotationNotification";
34
32
  LoginStep["magicLinkPostLoginSuccess"] = "magicLinkPostLoginSuccess";
35
33
  })(LoginStep || (exports.LoginStep = LoginStep = {}));
36
34
  let LoginFlow;
@@ -6,13 +6,12 @@ Object.defineProperty(exports, "__esModule", {
6
6
  });
7
7
  var _exportNames = {
8
8
  isMfaRequired: true,
9
- isResetPasswordRequired: true,
10
9
  mapMetaDataObjectToActions: true,
11
10
  getUri: true,
12
11
  extractPhoneNumber: true,
13
12
  isAuthRoute: true
14
13
  };
15
- exports.mapMetaDataObjectToActions = exports.isResetPasswordRequired = exports.isMfaRequired = exports.isAuthRoute = exports.getUri = exports.extractPhoneNumber = void 0;
14
+ exports.mapMetaDataObjectToActions = exports.isMfaRequired = exports.isAuthRoute = exports.getUri = exports.extractPhoneNumber = void 0;
16
15
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
17
16
  var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
18
17
  var _restApi = require("@frontegg/rest-api");
@@ -61,24 +60,13 @@ const isMfaRequired = (user, appName) => {
61
60
  contextHolder.setAccessToken(null);
62
61
  contextHolder.setUser(null);
63
62
  return true;
63
+ } else {
64
+ contextHolder.setAccessToken(user.accessToken);
65
+ contextHolder.setUser(user);
66
+ return false;
64
67
  }
65
- contextHolder.setAccessToken(user.accessToken);
66
- contextHolder.setUser(user);
67
- return false;
68
68
  };
69
69
  exports.isMfaRequired = isMfaRequired;
70
- const isResetPasswordRequired = (user, appName) => {
71
- const contextHolder = _restApi.ContextHolder.for(appName);
72
- if (user.resetPasswordToken) {
73
- contextHolder.setAccessToken(null);
74
- console.log('resetPasswordToken: ', user.resetPasswordToken);
75
- return true;
76
- }
77
- contextHolder.setAccessToken(user.accessToken);
78
- contextHolder.setUser(user);
79
- return false;
80
- };
81
- exports.isResetPasswordRequired = isResetPasswordRequired;
82
70
  const mapMetaDataObjectToActions = (obj, path = []) => {
83
71
  return Object.entries(obj).reduce((acc, [key, value]) => {
84
72
  if (typeof value === 'object') {
@@ -19,7 +19,6 @@ var _ApiTokensState = require("./ApiTokensState");
19
19
  var _ApplicationsState = require("./ApplicationsState");
20
20
  var _CustomLoginState = require("./CustomLoginState");
21
21
  var _ForgotPasswordState = require("./ForgotPasswordState");
22
- var _PasswordRotationState = require("./PasswordRotationState");
23
22
  var _GroupsState = require("./GroupsState");
24
23
  var _GroupsDialogsState = require("./GroupsDialogsState");
25
24
  var _ImpersonateState = require("./ImpersonateState");
@@ -167,7 +166,7 @@ Object.keys(_interfaces9).forEach(function (key) {
167
166
  }
168
167
  });
169
168
  });
170
- var _interfaces10 = require("./PasswordRotationState/interfaces");
169
+ var _interfaces10 = require("./GroupsState/interfaces");
171
170
  Object.keys(_interfaces10).forEach(function (key) {
172
171
  if (key === "default" || key === "__esModule") return;
173
172
  if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
@@ -179,7 +178,7 @@ Object.keys(_interfaces10).forEach(function (key) {
179
178
  }
180
179
  });
181
180
  });
182
- var _interfaces11 = require("./GroupsState/interfaces");
181
+ var _interfaces11 = require("./GroupsDialogsState/interfaces");
183
182
  Object.keys(_interfaces11).forEach(function (key) {
184
183
  if (key === "default" || key === "__esModule") return;
185
184
  if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
@@ -191,7 +190,7 @@ Object.keys(_interfaces11).forEach(function (key) {
191
190
  }
192
191
  });
193
192
  });
194
- var _interfaces12 = require("./GroupsDialogsState/interfaces");
193
+ var _interfaces12 = require("./ImpersonateState/interfaces");
195
194
  Object.keys(_interfaces12).forEach(function (key) {
196
195
  if (key === "default" || key === "__esModule") return;
197
196
  if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
@@ -203,7 +202,7 @@ Object.keys(_interfaces12).forEach(function (key) {
203
202
  }
204
203
  });
205
204
  });
206
- var _interfaces13 = require("./ImpersonateState/interfaces");
205
+ var _interfaces13 = require("./LoginState/interfaces");
207
206
  Object.keys(_interfaces13).forEach(function (key) {
208
207
  if (key === "default" || key === "__esModule") return;
209
208
  if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
@@ -215,7 +214,7 @@ Object.keys(_interfaces13).forEach(function (key) {
215
214
  }
216
215
  });
217
216
  });
218
- var _interfaces14 = require("./LoginState/interfaces");
217
+ var _interfaces14 = require("./MfaState/interfaces");
219
218
  Object.keys(_interfaces14).forEach(function (key) {
220
219
  if (key === "default" || key === "__esModule") return;
221
220
  if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
@@ -227,7 +226,7 @@ Object.keys(_interfaces14).forEach(function (key) {
227
226
  }
228
227
  });
229
228
  });
230
- var _interfaces15 = require("./MfaState/interfaces");
229
+ var _interfaces15 = require("./MSP/interfaces");
231
230
  Object.keys(_interfaces15).forEach(function (key) {
232
231
  if (key === "default" || key === "__esModule") return;
233
232
  if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
@@ -239,7 +238,7 @@ Object.keys(_interfaces15).forEach(function (key) {
239
238
  }
240
239
  });
241
240
  });
242
- var _interfaces16 = require("./MSP/interfaces");
241
+ var _interfaces16 = require("./PasskeysState/interfaces");
243
242
  Object.keys(_interfaces16).forEach(function (key) {
244
243
  if (key === "default" || key === "__esModule") return;
245
244
  if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
@@ -251,7 +250,7 @@ Object.keys(_interfaces16).forEach(function (key) {
251
250
  }
252
251
  });
253
252
  });
254
- var _interfaces17 = require("./PasskeysState/interfaces");
253
+ var _interfaces17 = require("./ProfileState/interfaces");
255
254
  Object.keys(_interfaces17).forEach(function (key) {
256
255
  if (key === "default" || key === "__esModule") return;
257
256
  if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
@@ -263,7 +262,7 @@ Object.keys(_interfaces17).forEach(function (key) {
263
262
  }
264
263
  });
265
264
  });
266
- var _interfaces18 = require("./ProfileState/interfaces");
265
+ var _interfaces18 = require("./ProvisioningState/interfaces");
267
266
  Object.keys(_interfaces18).forEach(function (key) {
268
267
  if (key === "default" || key === "__esModule") return;
269
268
  if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
@@ -275,7 +274,7 @@ Object.keys(_interfaces18).forEach(function (key) {
275
274
  }
276
275
  });
277
276
  });
278
- var _interfaces19 = require("./ProvisioningState/interfaces");
277
+ var _interfaces19 = require("./ResetPhoneNumberState/interfaces");
279
278
  Object.keys(_interfaces19).forEach(function (key) {
280
279
  if (key === "default" || key === "__esModule") return;
281
280
  if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
@@ -287,7 +286,7 @@ Object.keys(_interfaces19).forEach(function (key) {
287
286
  }
288
287
  });
289
288
  });
290
- var _interfaces20 = require("./ResetPhoneNumberState/interfaces");
289
+ var _interfaces20 = require("./RolesState/interfaces");
291
290
  Object.keys(_interfaces20).forEach(function (key) {
292
291
  if (key === "default" || key === "__esModule") return;
293
292
  if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
@@ -299,7 +298,7 @@ Object.keys(_interfaces20).forEach(function (key) {
299
298
  }
300
299
  });
301
300
  });
302
- var _interfaces21 = require("./RolesState/interfaces");
301
+ var _interfaces21 = require("./Security/RestrictionsState/interfaces");
303
302
  Object.keys(_interfaces21).forEach(function (key) {
304
303
  if (key === "default" || key === "__esModule") return;
305
304
  if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
@@ -311,7 +310,7 @@ Object.keys(_interfaces21).forEach(function (key) {
311
310
  }
312
311
  });
313
312
  });
314
- var _interfaces22 = require("./Security/RestrictionsState/interfaces");
313
+ var _interfaces22 = require("./Security/SecurityCenterState/interfaces");
315
314
  Object.keys(_interfaces22).forEach(function (key) {
316
315
  if (key === "default" || key === "__esModule") return;
317
316
  if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
@@ -323,7 +322,7 @@ Object.keys(_interfaces22).forEach(function (key) {
323
322
  }
324
323
  });
325
324
  });
326
- var _interfaces23 = require("./Security/SecurityCenterState/interfaces");
325
+ var _interfaces23 = require("./Security/SecurityPolicyState/interfaces");
327
326
  Object.keys(_interfaces23).forEach(function (key) {
328
327
  if (key === "default" || key === "__esModule") return;
329
328
  if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
@@ -335,7 +334,7 @@ Object.keys(_interfaces23).forEach(function (key) {
335
334
  }
336
335
  });
337
336
  });
338
- var _interfaces24 = require("./Security/SecurityPolicyState/interfaces");
337
+ var _interfaces24 = require("./Security/SessionsPolicyState/interfaces");
339
338
  Object.keys(_interfaces24).forEach(function (key) {
340
339
  if (key === "default" || key === "__esModule") return;
341
340
  if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
@@ -347,7 +346,7 @@ Object.keys(_interfaces24).forEach(function (key) {
347
346
  }
348
347
  });
349
348
  });
350
- var _interfaces25 = require("./Security/SessionsPolicyState/interfaces");
349
+ var _interfaces25 = require("./SessionsState/interfaces");
351
350
  Object.keys(_interfaces25).forEach(function (key) {
352
351
  if (key === "default" || key === "__esModule") return;
353
352
  if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
@@ -359,7 +358,7 @@ Object.keys(_interfaces25).forEach(function (key) {
359
358
  }
360
359
  });
361
360
  });
362
- var _interfaces26 = require("./SessionsState/interfaces");
361
+ var _interfaces26 = require("./SignUpState/interfaces");
363
362
  Object.keys(_interfaces26).forEach(function (key) {
364
363
  if (key === "default" || key === "__esModule") return;
365
364
  if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
@@ -371,7 +370,7 @@ Object.keys(_interfaces26).forEach(function (key) {
371
370
  }
372
371
  });
373
372
  });
374
- var _interfaces27 = require("./SignUpState/interfaces");
373
+ var _interfaces27 = require("./SmsState/interfaces");
375
374
  Object.keys(_interfaces27).forEach(function (key) {
376
375
  if (key === "default" || key === "__esModule") return;
377
376
  if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
@@ -383,7 +382,7 @@ Object.keys(_interfaces27).forEach(function (key) {
383
382
  }
384
383
  });
385
384
  });
386
- var _interfaces28 = require("./SmsState/interfaces");
385
+ var _interfaces28 = require("./SocialLoginState/interfaces");
387
386
  Object.keys(_interfaces28).forEach(function (key) {
388
387
  if (key === "default" || key === "__esModule") return;
389
388
  if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
@@ -395,7 +394,7 @@ Object.keys(_interfaces28).forEach(function (key) {
395
394
  }
396
395
  });
397
396
  });
398
- var _interfaces29 = require("./SocialLoginState/interfaces");
397
+ var _interfaces29 = require("./SSOState/interfaces");
399
398
  Object.keys(_interfaces29).forEach(function (key) {
400
399
  if (key === "default" || key === "__esModule") return;
401
400
  if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
@@ -407,7 +406,7 @@ Object.keys(_interfaces29).forEach(function (key) {
407
406
  }
408
407
  });
409
408
  });
410
- var _interfaces30 = require("./SSOState/interfaces");
409
+ var _interfaces30 = require("./StepUpState/interfaces");
411
410
  Object.keys(_interfaces30).forEach(function (key) {
412
411
  if (key === "default" || key === "__esModule") return;
413
412
  if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
@@ -419,7 +418,7 @@ Object.keys(_interfaces30).forEach(function (key) {
419
418
  }
420
419
  });
421
420
  });
422
- var _interfaces31 = require("./StepUpState/interfaces");
421
+ var _interfaces31 = require("./TeamState/interfaces");
423
422
  Object.keys(_interfaces31).forEach(function (key) {
424
423
  if (key === "default" || key === "__esModule") return;
425
424
  if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
@@ -431,7 +430,7 @@ Object.keys(_interfaces31).forEach(function (key) {
431
430
  }
432
431
  });
433
432
  });
434
- var _interfaces32 = require("./TeamState/interfaces");
433
+ var _interfaces32 = require("./TenantsState/interfaces");
435
434
  Object.keys(_interfaces32).forEach(function (key) {
436
435
  if (key === "default" || key === "__esModule") return;
437
436
  if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
@@ -443,7 +442,7 @@ Object.keys(_interfaces32).forEach(function (key) {
443
442
  }
444
443
  });
445
444
  });
446
- var _interfaces33 = require("./TenantsState/interfaces");
445
+ var _interfaces33 = require("./interfaces");
447
446
  Object.keys(_interfaces33).forEach(function (key) {
448
447
  if (key === "default" || key === "__esModule") return;
449
448
  if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
@@ -455,18 +454,6 @@ Object.keys(_interfaces33).forEach(function (key) {
455
454
  }
456
455
  });
457
456
  });
458
- var _interfaces34 = require("./interfaces");
459
- Object.keys(_interfaces34).forEach(function (key) {
460
- if (key === "default" || key === "__esModule") return;
461
- if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
462
- if (key in exports && exports[key] === _interfaces34[key]) return;
463
- Object.defineProperty(exports, key, {
464
- enumerable: true,
465
- get: function () {
466
- return _interfaces34[key];
467
- }
468
- });
469
- });
470
457
  const _excluded = ["routes"],
471
458
  _excluded2 = ["requestName"];
472
459
  const createAuthState = _overrideState => {
@@ -498,7 +485,6 @@ const createAuthState = _overrideState => {
498
485
  applicationsState: (0, _ApplicationsState.createApplicationsState)(overrideState == null ? void 0 : overrideState.applicationsState),
499
486
  customLoginState: (0, _CustomLoginState.createCustomLoginState)(overrideState == null ? void 0 : overrideState.customLoginState),
500
487
  forgotPasswordState: (0, _ForgotPasswordState.createForgotPasswordState)(overrideState == null ? void 0 : overrideState.forgotPasswordState),
501
- passwordRotationState: (0, _PasswordRotationState.createPasswordRotationState)(overrideState == null ? void 0 : overrideState.passwordRotationState),
502
488
  groupsState: (0, _GroupsState.createGroupsState)(overrideState == null ? void 0 : overrideState.groupsState),
503
489
  groupsDialogsState: (0, _GroupsDialogsState.createGroupsDialogsState)(overrideState == null ? void 0 : overrideState.groupsDialogsState),
504
490
  impersonateState: (0, _ImpersonateState.createImpersonateState)(overrideState == null ? void 0 : overrideState.impersonateState),
@@ -565,7 +551,6 @@ const buildAuthActions = (store, api, actions, snapshotAuthState) => {
565
551
  const customLoginActions = (0, _CustomLoginState.buildCustomLoginActions)(store, api, actions);
566
552
  const entitlementsActions = (0, _Entitlements.buildEntitlementsActions)(store, api, actions);
567
553
  const forgotPasswordActions = (0, _ForgotPasswordState.buildForgotPasswordActions)(store, api, actions);
568
- const passwordRotationActions = (0, _PasswordRotationState.buildPasswordRotationActions)(store, api, actions);
569
554
  const groupsActions = (0, _GroupsState.buildGroupsActions)(store, api, actions);
570
555
  const groupsDialogsActions = (0, _GroupsDialogsState.buildGroupsDialogsActions)(store, api, actions);
571
556
  const impersonateActions = (0, _ImpersonateState.buildImpersonateActions)(store, api, actions);
@@ -600,7 +585,6 @@ const buildAuthActions = (store, api, actions, snapshotAuthState) => {
600
585
  customLoginActions,
601
586
  entitlementsActions,
602
587
  forgotPasswordActions,
603
- passwordRotationActions,
604
588
  groupsActions,
605
589
  groupsDialogsActions,
606
590
  impersonateActions,
package/node/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license Frontegg v7.57.0-alpha.6
1
+ /** @license Frontegg v7.58.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.
@@ -17,7 +17,6 @@ var _applicationsActions = _interopRequireDefault(require("./applicationsActions
17
17
  var _customLoginActions = _interopRequireDefault(require("./customLoginActions.mocks"));
18
18
  var _entitlementsActions = _interopRequireDefault(require("./entitlementsActions.mocks"));
19
19
  var _forgotPasswordActions = _interopRequireDefault(require("./forgotPasswordActions.mocks"));
20
- var _passwordRotationActions = _interopRequireDefault(require("./passwordRotationActions.mocks"));
21
20
  var _groupsActions = _interopRequireDefault(require("./groupsActions.mocks"));
22
21
  var _GroupsDialogsState = require("../../auth/GroupsDialogsState");
23
22
  var _impersonateActions = _interopRequireDefault(require("./impersonateActions.mocks"));
@@ -55,7 +54,6 @@ const buildAuthActions = (store, api, actions, snapshotAuthState) => {
55
54
  const customLoginActions = (0, _customLoginActions.default)(store, api, actions);
56
55
  const entitlementsActions = (0, _entitlementsActions.default)(store, api, actions);
57
56
  const forgotPasswordActions = (0, _forgotPasswordActions.default)(store, api, actions);
58
- const passwordRotationActions = (0, _passwordRotationActions.default)(store, api, actions);
59
57
  const groupsActions = (0, _groupsActions.default)(store, api, actions);
60
58
  const groupsDialogsActions = (0, _GroupsDialogsState.buildGroupsDialogsActions)(store, api, actions);
61
59
  const impersonateActions = (0, _impersonateActions.default)(store, api, actions);
@@ -90,7 +88,6 @@ const buildAuthActions = (store, api, actions, snapshotAuthState) => {
90
88
  customLoginActions,
91
89
  entitlementsActions,
92
90
  forgotPasswordActions,
93
- passwordRotationActions,
94
91
  groupsActions,
95
92
  groupsDialogsActions,
96
93
  impersonateActions,
@@ -150,7 +147,7 @@ const buildAuthActions = (store, api, actions, snapshotAuthState) => {
150
147
  setErrorByRequestName,
151
148
  resetAuthState,
152
149
  setUser
153
- }, acceptInvitationActions, accountSettingsActions, activateAccountActions, unlockAccountActions, allAccountsActions, allAccountsDialogActions, apiTokensActions, applicationsActions, customLoginActions, entitlementsActions, forgotPasswordActions, passwordRotationActions, groupsActions, groupsDialogsActions, impersonateActions, loginActions, mfaActions, passkeysActions, profileActions, provisioningActions, resetPhoneNumberActions, restrictionsActions, rolesActions, securityCenterActions, securityPolicyActions, sessionsActions, sessionsPolicyActions, signUpActions, smsActions, socialLoginActions, ssoActions, stepUpActions, teamActions, tenantsActions);
150
+ }, acceptInvitationActions, accountSettingsActions, activateAccountActions, unlockAccountActions, allAccountsActions, allAccountsDialogActions, apiTokensActions, applicationsActions, customLoginActions, entitlementsActions, forgotPasswordActions, groupsActions, groupsDialogsActions, impersonateActions, loginActions, mfaActions, passkeysActions, profileActions, provisioningActions, resetPhoneNumberActions, restrictionsActions, rolesActions, securityCenterActions, securityPolicyActions, sessionsActions, sessionsPolicyActions, signUpActions, smsActions, socialLoginActions, ssoActions, stepUpActions, teamActions, tenantsActions);
154
151
  return {
155
152
  authActions,
156
153
  authStateActions
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@frontegg/redux-store",
3
- "version": "7.57.0-alpha.6",
3
+ "version": "7.58.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.57.0-alpha.6",
10
+ "@frontegg/rest-api": "7.58.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",
@@ -1,6 +0,0 @@
1
- import type { FronteggState, RestApi, SharedActions } from '../../interfaces';
2
- import { PasswordRotationStep } from './interfaces';
3
- declare const _default: (store: FronteggState, api: RestApi, sharedActions: SharedActions) => {
4
- setStep: (step: PasswordRotationStep) => void;
5
- };
6
- export default _default;
@@ -1,13 +0,0 @@
1
- export default ((store, api, sharedActions) => {
2
- const setPasswordRotationState = payload => {
3
- Object.assign(store.auth.passwordRotationState, payload);
4
- };
5
- const setStep = step => {
6
- setPasswordRotationState({
7
- step
8
- });
9
- };
10
- return {
11
- setStep
12
- };
13
- });
@@ -1,3 +0,0 @@
1
- import createPasswordRotationState from './state';
2
- import buildPasswordRotationActions from './actions';
3
- export { createPasswordRotationState, buildPasswordRotationActions };
@@ -1,3 +0,0 @@
1
- import createPasswordRotationState from './state';
2
- import buildPasswordRotationActions from './actions';
3
- export { createPasswordRotationState, buildPasswordRotationActions };
@@ -1,7 +0,0 @@
1
- export declare enum PasswordRotationStep {
2
- 'success' = "success",
3
- 'notification' = "notification"
4
- }
5
- export interface PasswordRotationState {
6
- step: PasswordRotationStep;
7
- }
@@ -1,5 +0,0 @@
1
- export let PasswordRotationStep;
2
- (function (PasswordRotationStep) {
3
- PasswordRotationStep["success"] = "success";
4
- PasswordRotationStep["notification"] = "notification";
5
- })(PasswordRotationStep || (PasswordRotationStep = {}));
@@ -1,4 +0,0 @@
1
- import { PasswordRotationState } from './interfaces';
2
- export declare const initialState: PasswordRotationState;
3
- declare const _default: (overrideState?: Partial<PasswordRotationState>) => PasswordRotationState;
4
- export default _default;
@@ -1,6 +0,0 @@
1
- import { PasswordRotationStep } from './interfaces';
2
- import { createProxy } from '../../toolkit/proxy';
3
- export const initialState = {
4
- step: PasswordRotationStep.notification
5
- };
6
- export default (overrideState => createProxy(initialState, overrideState));
@@ -1,6 +0,0 @@
1
- import { FronteggState, RestApi, SharedActions } from '../../interfaces';
2
- import { PasswordRotationStep } from '../../toolkit';
3
- declare const _default: (store: FronteggState, api: RestApi, actions: SharedActions) => {
4
- setStep: (step: PasswordRotationStep) => void;
5
- };
6
- export default _default;
@@ -1,9 +0,0 @@
1
- import { buildPasswordRotationActions } from '../../auth/PasswordRotationState';
2
- import { PasswordRotationStep } from '../../toolkit';
3
- import { mockActionsExpect } from '../helpers';
4
- export default ((store, api, actions) => {
5
- const originalActions = buildPasswordRotationActions(store, api, actions);
6
- const mockedActions = mockActionsExpect(originalActions, ['setStep']);
7
- mockedActions.setStep(PasswordRotationStep.success);
8
- return mockedActions;
9
- });
@@ -1,20 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
- var _default = (store, api, sharedActions) => {
8
- const setPasswordRotationState = payload => {
9
- Object.assign(store.auth.passwordRotationState, payload);
10
- };
11
- const setStep = step => {
12
- setPasswordRotationState({
13
- step
14
- });
15
- };
16
- return {
17
- setStep
18
- };
19
- };
20
- exports.default = _default;
@@ -1,20 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- Object.defineProperty(exports, "buildPasswordRotationActions", {
8
- enumerable: true,
9
- get: function () {
10
- return _actions.default;
11
- }
12
- });
13
- Object.defineProperty(exports, "createPasswordRotationState", {
14
- enumerable: true,
15
- get: function () {
16
- return _state.default;
17
- }
18
- });
19
- var _state = _interopRequireDefault(require("./state"));
20
- var _actions = _interopRequireDefault(require("./actions"));
@@ -1,12 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.PasswordRotationStep = void 0;
7
- let PasswordRotationStep;
8
- exports.PasswordRotationStep = PasswordRotationStep;
9
- (function (PasswordRotationStep) {
10
- PasswordRotationStep["success"] = "success";
11
- PasswordRotationStep["notification"] = "notification";
12
- })(PasswordRotationStep || (exports.PasswordRotationStep = PasswordRotationStep = {}));
@@ -1,14 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.initialState = exports.default = void 0;
7
- var _interfaces = require("./interfaces");
8
- var _proxy = require("../../toolkit/proxy");
9
- const initialState = {
10
- step: _interfaces.PasswordRotationStep.notification
11
- };
12
- exports.initialState = initialState;
13
- var _default = overrideState => (0, _proxy.createProxy)(initialState, overrideState);
14
- exports.default = _default;
@@ -1,16 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
- var _PasswordRotationState = require("../../auth/PasswordRotationState");
8
- var _toolkit = require("../../toolkit");
9
- var _helpers = require("../helpers");
10
- var _default = (store, api, actions) => {
11
- const originalActions = (0, _PasswordRotationState.buildPasswordRotationActions)(store, api, actions);
12
- const mockedActions = (0, _helpers.mockActionsExpect)(originalActions, ['setStep']);
13
- mockedActions.setStep(_toolkit.PasswordRotationStep.success);
14
- return mockedActions;
15
- };
16
- exports.default = _default;