@frontegg/redux-store 6.46.0 → 6.47.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.
@@ -83,6 +83,6 @@ export declare type WithDeviceId<T> = T & {
83
83
  export declare type IEnrollMFAWebAuthnPayload = WithCallback<Omit<IEnrollMFAWebAuthn, 'options'>> & {
84
84
  publicKey: Credential;
85
85
  };
86
- export declare type IVerifyMFAWebAuthnPayload = WithCallback<WithDeviceId<IVerifyMFAWebAuthn>> & {
86
+ export declare type IVerifyMFAWebAuthnPayload = WithCallback<WithDeviceId<Omit<IVerifyMFAWebAuthn, 'options'>>> & {
87
87
  publicKey: Credential;
88
88
  };
@@ -121,9 +121,9 @@ export const isMfaRequired = user => {
121
121
  };
122
122
 
123
123
  const getNumberOfMfaDevices = mfaDevices => {
124
- const numberOfWebAuthnDevices = mfaDevices.webauthn.length;
125
- const numberOfPhoneDevices = mfaDevices.phones.length;
126
- const numberOfAuthenticators = mfaDevices.authenticators.length;
124
+ const numberOfWebAuthnDevices = +Boolean(mfaDevices.webauthn.length);
125
+ const numberOfPhoneDevices = +Boolean(mfaDevices.phones.length);
126
+ const numberOfAuthenticators = +Boolean(mfaDevices.authenticators.length);
127
127
  const totalDevices = numberOfWebAuthnDevices + numberOfPhoneDevices + numberOfAuthenticators;
128
128
  return {
129
129
  numberOfWebAuthnDevices,
@@ -160,9 +160,9 @@ const getMfaStepForNotEnrolledUsers = mfaStrategies => {
160
160
  } else if (strategy === MFAStrategyEnum.SMS) {
161
161
  return MFAStep.smsSetPhoneNumber;
162
162
  }
163
-
164
- return MFAStep.verify;
165
163
  }
164
+
165
+ return MFAStep.verify;
166
166
  };
167
167
 
168
168
  export function* getMfaRequiredState(user) {
package/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license Frontegg v6.46.0
1
+ /** @license Frontegg v6.47.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.
@@ -164,9 +164,9 @@ const isMfaRequired = user => {
164
164
  exports.isMfaRequired = isMfaRequired;
165
165
 
166
166
  const getNumberOfMfaDevices = mfaDevices => {
167
- const numberOfWebAuthnDevices = mfaDevices.webauthn.length;
168
- const numberOfPhoneDevices = mfaDevices.phones.length;
169
- const numberOfAuthenticators = mfaDevices.authenticators.length;
167
+ const numberOfWebAuthnDevices = +Boolean(mfaDevices.webauthn.length);
168
+ const numberOfPhoneDevices = +Boolean(mfaDevices.phones.length);
169
+ const numberOfAuthenticators = +Boolean(mfaDevices.authenticators.length);
170
170
  const totalDevices = numberOfWebAuthnDevices + numberOfPhoneDevices + numberOfAuthenticators;
171
171
  return {
172
172
  numberOfWebAuthnDevices,
@@ -203,9 +203,9 @@ const getMfaStepForNotEnrolledUsers = mfaStrategies => {
203
203
  } else if (strategy === _restApi.MFAStrategyEnum.SMS) {
204
204
  return _interfaces3.MFAStep.smsSetPhoneNumber;
205
205
  }
206
-
207
- return _interfaces3.MFAStep.verify;
208
206
  }
207
+
208
+ return _interfaces3.MFAStep.verify;
209
209
  };
210
210
 
211
211
  function* getMfaRequiredState(user) {
package/node/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license Frontegg v6.46.0
1
+ /** @license Frontegg v6.47.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@frontegg/redux-store",
3
- "version": "6.46.0",
3
+ "version": "6.47.0",
4
4
  "main": "./node/index.js",
5
5
  "license": "MIT",
6
6
  "author": "Frontegg LTD",