@frontegg/redux-store 7.60.0-alpha.1 → 7.60.0-alpha.3

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.
@@ -48,31 +48,36 @@ export default ((store, api, sharedActions) => {
48
48
  step: LoginStep.breachedPassword,
49
49
  loading: false
50
50
  });
51
- } else if (passwordRotationFlagEnabled && isResetPasswordRequired(user, store.root.appName)) {
51
+ callback == null ? void 0 : callback(true);
52
+ return;
53
+ }
54
+ if (passwordRotationFlagEnabled && isResetPasswordRequired(user, store.root.appName)) {
52
55
  actions.setLoginState({
53
56
  step: LoginStep.passwordRotationExpired,
54
57
  loading: false,
55
58
  resetPasswordToken: user.resetPasswordToken,
56
59
  userId: user.userId
57
60
  });
61
+ callback == null ? void 0 : callback(true);
62
+ return;
63
+ }
64
+ const shouldShowPasswordRotationPrompt = shouldShowPasswordRotationPromptFunc(user);
65
+ if (passwordRotationFlagEnabled && shouldShowPasswordRotationPrompt) {
66
+ actions.setLoginState({
67
+ step: LoginStep.passwordRotationNotification,
68
+ loading: false
69
+ });
70
+ callback == null ? void 0 : callback(true);
71
+ return;
72
+ }
73
+ const shouldShowPrompt = await actions.__shouldShowPromptPasskeys();
74
+ if (shouldShowPrompt) {
75
+ actions.setLoginState({
76
+ step: LoginStep.promptPasskeys,
77
+ loading: false
78
+ });
58
79
  } else {
59
- const shouldShowPasswordRotationPrompt = shouldShowPasswordRotationPromptFunc(user);
60
- if (passwordRotationFlagEnabled && shouldShowPasswordRotationPrompt) {
61
- actions.setLoginState({
62
- step: LoginStep.passwordRotationNotification,
63
- loading: false
64
- });
65
- } else {
66
- const shouldShowPrompt = await actions.__shouldShowPromptPasskeys();
67
- if (shouldShowPrompt) {
68
- actions.setLoginState({
69
- step: LoginStep.promptPasskeys,
70
- loading: false
71
- });
72
- } else {
73
- await actions.afterAuthNavigation();
74
- }
75
- }
80
+ await actions.afterAuthNavigation();
76
81
  }
77
82
  callback == null ? void 0 : callback(true);
78
83
  }
package/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license Frontegg v7.60.0-alpha.1
1
+ /** @license Frontegg v7.60.0-alpha.3
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.
@@ -55,31 +55,36 @@ var _default = (store, api, sharedActions) => {
55
55
  step: _interfaces.LoginStep.breachedPassword,
56
56
  loading: false
57
57
  });
58
- } else if (passwordRotationFlagEnabled && (0, _helpers2.isResetPasswordRequired)(user, store.root.appName)) {
58
+ callback == null ? void 0 : callback(true);
59
+ return;
60
+ }
61
+ if (passwordRotationFlagEnabled && (0, _helpers2.isResetPasswordRequired)(user, store.root.appName)) {
59
62
  actions.setLoginState({
60
63
  step: _interfaces.LoginStep.passwordRotationExpired,
61
64
  loading: false,
62
65
  resetPasswordToken: user.resetPasswordToken,
63
66
  userId: user.userId
64
67
  });
68
+ callback == null ? void 0 : callback(true);
69
+ return;
70
+ }
71
+ const shouldShowPasswordRotationPrompt = (0, _helpers2.shouldShowPasswordRotationPromptFunc)(user);
72
+ if (passwordRotationFlagEnabled && shouldShowPasswordRotationPrompt) {
73
+ actions.setLoginState({
74
+ step: _interfaces.LoginStep.passwordRotationNotification,
75
+ loading: false
76
+ });
77
+ callback == null ? void 0 : callback(true);
78
+ return;
79
+ }
80
+ const shouldShowPrompt = await actions.__shouldShowPromptPasskeys();
81
+ if (shouldShowPrompt) {
82
+ actions.setLoginState({
83
+ step: _interfaces.LoginStep.promptPasskeys,
84
+ loading: false
85
+ });
65
86
  } else {
66
- const shouldShowPasswordRotationPrompt = (0, _helpers2.shouldShowPasswordRotationPromptFunc)(user);
67
- if (passwordRotationFlagEnabled && shouldShowPasswordRotationPrompt) {
68
- actions.setLoginState({
69
- step: _interfaces.LoginStep.passwordRotationNotification,
70
- loading: false
71
- });
72
- } else {
73
- const shouldShowPrompt = await actions.__shouldShowPromptPasskeys();
74
- if (shouldShowPrompt) {
75
- actions.setLoginState({
76
- step: _interfaces.LoginStep.promptPasskeys,
77
- loading: false
78
- });
79
- } else {
80
- await actions.afterAuthNavigation();
81
- }
82
- }
87
+ await actions.afterAuthNavigation();
83
88
  }
84
89
  callback == null ? void 0 : callback(true);
85
90
  }
package/node/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license Frontegg v7.60.0-alpha.1
1
+ /** @license Frontegg v7.60.0-alpha.3
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.
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@frontegg/redux-store",
3
- "version": "7.60.0-alpha.1",
3
+ "version": "7.60.0-alpha.3",
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.60.0-alpha.1",
10
+ "@frontegg/rest-api": "7.60.0-alpha.3",
11
11
  "fast-deep-equal": "3.1.3",
12
12
  "get-value": "^3.0.1",
13
13
  "proxy-compare": "^3.0.0",