@frontegg/redux-store 7.33.0 → 7.34.0-alpha.1
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/auth/LoginState/actions/index.js +7 -4
- package/auth/LoginState/actions/mfaRequiredState.actions.d.ts +1 -1
- package/auth/LoginState/actions/mfaRequiredState.actions.js +2 -2
- package/index.js +1 -1
- package/node/auth/LoginState/actions/index.js +7 -4
- package/node/auth/LoginState/actions/mfaRequiredState.actions.js +2 -2
- package/node/index.js +1 -1
- package/package.json +2 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
2
2
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
3
|
-
const _excluded = ["callback"],
|
|
3
|
+
const _excluded = ["callback", "error"],
|
|
4
4
|
_excluded2 = ["callback"],
|
|
5
5
|
_excluded3 = ["callback"],
|
|
6
6
|
_excluded4 = ["callback"],
|
|
@@ -311,7 +311,8 @@ export default ((store, api, sharedActions) => {
|
|
|
311
311
|
};
|
|
312
312
|
const ssoPreloginFailed = async _ref3 => {
|
|
313
313
|
let {
|
|
314
|
-
callback
|
|
314
|
+
callback,
|
|
315
|
+
error
|
|
315
316
|
} = _ref3,
|
|
316
317
|
body = _objectWithoutPropertiesLoose(_ref3, _excluded);
|
|
317
318
|
const publicPolicy = store.auth.securityPolicyState.publicPolicy.policy;
|
|
@@ -337,7 +338,8 @@ export default ((store, api, sharedActions) => {
|
|
|
337
338
|
} else {
|
|
338
339
|
actions.setLoginState({
|
|
339
340
|
step: LoginStep.loginWithPassword,
|
|
340
|
-
loading: false
|
|
341
|
+
loading: false,
|
|
342
|
+
error: errorHandler(error)
|
|
341
343
|
});
|
|
342
344
|
callback == null ? void 0 : callback();
|
|
343
345
|
}
|
|
@@ -402,7 +404,8 @@ export default ((store, api, sharedActions) => {
|
|
|
402
404
|
email,
|
|
403
405
|
recaptchaToken,
|
|
404
406
|
callback,
|
|
405
|
-
invitationToken
|
|
407
|
+
invitationToken,
|
|
408
|
+
error: e
|
|
406
409
|
});
|
|
407
410
|
}
|
|
408
411
|
};
|
|
@@ -2,7 +2,7 @@ import { LoginState } from '../interfaces';
|
|
|
2
2
|
import { MFAState } from '../../MfaState/interfaces';
|
|
3
3
|
import { AuthState, User } from '../../interfaces';
|
|
4
4
|
import { FronteggState, RestApi, RetryConfig, SharedActions } from '../../../interfaces';
|
|
5
|
-
declare const _default: (store: FronteggState, api: RestApi,
|
|
5
|
+
declare const _default: (store: FronteggState, api: RestApi, _sharedActions: SharedActions) => {
|
|
6
6
|
getMfaRequiredState: (user: User | any, retryConfig?: RetryConfig, shouldContinueWhenFailing?: boolean) => Promise<Partial<AuthState> & {
|
|
7
7
|
mfaState: Partial<MFAState>;
|
|
8
8
|
loginState: Partial<LoginState>;
|
|
@@ -3,8 +3,7 @@ import { getMfaStepForEnrolledUsers, getMfaStepForNotEnrolledUsers } from '../he
|
|
|
3
3
|
import { LoginStep, LoginFlow } from '../interfaces';
|
|
4
4
|
import { MFAStep } from '../../MfaState/interfaces';
|
|
5
5
|
import { retryIfNeeded } from '../../../helpers';
|
|
6
|
-
export default ((store, api,
|
|
7
|
-
const actions = sharedActions;
|
|
6
|
+
export default ((store, api, _sharedActions) => {
|
|
8
7
|
const getMfaRequiredState = async (user, retryConfig, shouldContinueWhenFailing = false) => {
|
|
9
8
|
let step = LoginStep.loginWithTwoFactor;
|
|
10
9
|
const mfaState = {
|
|
@@ -28,6 +27,7 @@ export default ((store, api, sharedActions) => {
|
|
|
28
27
|
if (isEnrolled) {
|
|
29
28
|
Object.assign(mfaState, {
|
|
30
29
|
mfaDevices: user.mfaDevices,
|
|
30
|
+
mfaToken: user.mfaToken,
|
|
31
31
|
step: getMfaStepForEnrolledUsers(user.mfaDevices)
|
|
32
32
|
});
|
|
33
33
|
} else {
|
package/index.js
CHANGED
|
@@ -27,7 +27,7 @@ var _helpers3 = require("../../helpers");
|
|
|
27
27
|
var _interfaces3 = require("../../MfaState/interfaces");
|
|
28
28
|
var _interfaces4 = require("../../SSOState/interfaces");
|
|
29
29
|
var _constants = require("../../../constants");
|
|
30
|
-
const _excluded = ["callback"],
|
|
30
|
+
const _excluded = ["callback", "error"],
|
|
31
31
|
_excluded2 = ["callback"],
|
|
32
32
|
_excluded3 = ["callback"],
|
|
33
33
|
_excluded4 = ["callback"],
|
|
@@ -316,7 +316,8 @@ var _default = (store, api, sharedActions) => {
|
|
|
316
316
|
};
|
|
317
317
|
const ssoPreloginFailed = async _ref3 => {
|
|
318
318
|
let {
|
|
319
|
-
callback
|
|
319
|
+
callback,
|
|
320
|
+
error
|
|
320
321
|
} = _ref3,
|
|
321
322
|
body = (0, _objectWithoutPropertiesLoose2.default)(_ref3, _excluded);
|
|
322
323
|
const publicPolicy = store.auth.securityPolicyState.publicPolicy.policy;
|
|
@@ -342,7 +343,8 @@ var _default = (store, api, sharedActions) => {
|
|
|
342
343
|
} else {
|
|
343
344
|
actions.setLoginState({
|
|
344
345
|
step: _interfaces.LoginStep.loginWithPassword,
|
|
345
|
-
loading: false
|
|
346
|
+
loading: false,
|
|
347
|
+
error: (0, _helpers.errorHandler)(error)
|
|
346
348
|
});
|
|
347
349
|
callback == null ? void 0 : callback();
|
|
348
350
|
}
|
|
@@ -407,7 +409,8 @@ var _default = (store, api, sharedActions) => {
|
|
|
407
409
|
email,
|
|
408
410
|
recaptchaToken,
|
|
409
411
|
callback,
|
|
410
|
-
invitationToken
|
|
412
|
+
invitationToken,
|
|
413
|
+
error: e
|
|
411
414
|
});
|
|
412
415
|
}
|
|
413
416
|
};
|
|
@@ -10,8 +10,7 @@ var _helpers = require("../helpers");
|
|
|
10
10
|
var _interfaces = require("../interfaces");
|
|
11
11
|
var _interfaces2 = require("../../MfaState/interfaces");
|
|
12
12
|
var _helpers2 = require("../../../helpers");
|
|
13
|
-
var _default = (store, api,
|
|
14
|
-
const actions = sharedActions;
|
|
13
|
+
var _default = (store, api, _sharedActions) => {
|
|
15
14
|
const getMfaRequiredState = async (user, retryConfig, shouldContinueWhenFailing = false) => {
|
|
16
15
|
let step = _interfaces.LoginStep.loginWithTwoFactor;
|
|
17
16
|
const mfaState = {
|
|
@@ -35,6 +34,7 @@ var _default = (store, api, sharedActions) => {
|
|
|
35
34
|
if (isEnrolled) {
|
|
36
35
|
Object.assign(mfaState, {
|
|
37
36
|
mfaDevices: user.mfaDevices,
|
|
37
|
+
mfaToken: user.mfaToken,
|
|
38
38
|
step: (0, _helpers.getMfaStepForEnrolledUsers)(user.mfaDevices)
|
|
39
39
|
});
|
|
40
40
|
} else {
|
package/node/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@frontegg/redux-store",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.34.0-alpha.1",
|
|
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.
|
|
10
|
+
"@frontegg/rest-api": "7.34.0-alpha.1",
|
|
11
11
|
"fast-deep-equal": "3.1.3",
|
|
12
12
|
"get-value": "^3.0.1",
|
|
13
13
|
"proxy-compare": "^3.0.0",
|