@frontegg/redux-store 7.34.0-alpha.0 → 7.34.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.
|
@@ -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
|
@@ -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.34.0
|
|
3
|
+
"version": "7.34.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.34.0
|
|
10
|
+
"@frontegg/rest-api": "7.34.0",
|
|
11
11
|
"fast-deep-equal": "3.1.3",
|
|
12
12
|
"get-value": "^3.0.1",
|
|
13
13
|
"proxy-compare": "^3.0.0",
|