@frontegg/redux-store 6.84.0-alpha.0 → 6.84.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.
@@ -33,7 +33,7 @@ import { createRandomString, generateCodeChallenge, getFeatureFlags } from '../.
33
33
  import { ResetPhoneNumberStep } from '../ResetPhoneNumberState/interfaces';
34
34
  import { base64urlDecode, delay, publicKeyCredentialToJSON } from '../utils';
35
35
  import { loadPublicAuthStrategiesPolicy } from '../SecurityPolicyState/saga';
36
- import { useIsPasskeysEnabled } from '../PasskeysState/helpers';
36
+ import { getPasskeysVendorPolicy } from '../PasskeysState/helpers';
37
37
  import { getRedirectUrl } from './utils';
38
38
  const authStrategyLoginStepMap = {
39
39
  [AuthStrategyEnum.Code]: LoginStep.loginWithOtc,
@@ -781,7 +781,7 @@ export function* shouldShowPromptPasskeys() {
781
781
  const {
782
782
  policy
783
783
  } = publicAuthStrategyPolicy;
784
- const isPasskeysEnabledByVendor = useIsPasskeysEnabled(policy);
784
+ const isPasskeysEnabledByVendor = getPasskeysVendorPolicy(policy);
785
785
  const isLoggedInWithPasskeys = localStorage.getItem('preferred-login-method') === 'Passkeys';
786
786
  const isMarkedDontShowAgainPrompt = localStorage.getItem('dont-show-again-prompt-passkeys') === 'true';
787
787
  const [showPasskeys] = yield call(getFeatureFlags, ['show-passkeys']);
@@ -1,2 +1,2 @@
1
1
  import { IAuthStrategiesConfig } from '@frontegg/rest-api';
2
- export declare const useIsPasskeysEnabled: (policy: IAuthStrategiesConfig) => boolean;
2
+ export declare const getPasskeysVendorPolicy: (policy: IAuthStrategiesConfig) => boolean;
@@ -1,6 +1,7 @@
1
1
  import { SecondaryAuthStrategy } from '@frontegg/rest-api';
2
- export const useIsPasskeysEnabled = policy => {
3
- return !!(policy != null && policy.secondaryAuthStrategies.some(({
2
+ export const getPasskeysVendorPolicy = policy => {
3
+ var _policy$secondaryAuth;
4
+ return !!(policy != null && (_policy$secondaryAuth = policy.secondaryAuthStrategies) != null && _policy$secondaryAuth.some(({
4
5
  isActive,
5
6
  strategy
6
7
  }) => isActive && strategy === SecondaryAuthStrategy.Passkeys));
package/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license Frontegg v6.84.0-alpha.0
1
+ /** @license Frontegg v6.84.0-alpha.1
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.
@@ -798,7 +798,7 @@ function* shouldShowPromptPasskeys() {
798
798
  const {
799
799
  policy
800
800
  } = publicAuthStrategyPolicy;
801
- const isPasskeysEnabledByVendor = (0, _helpers2.useIsPasskeysEnabled)(policy);
801
+ const isPasskeysEnabledByVendor = (0, _helpers2.getPasskeysVendorPolicy)(policy);
802
802
  const isLoggedInWithPasskeys = localStorage.getItem('preferred-login-method') === 'Passkeys';
803
803
  const isMarkedDontShowAgainPrompt = localStorage.getItem('dont-show-again-prompt-passkeys') === 'true';
804
804
  const [showPasskeys] = yield (0, _effects.call)(_helpers.getFeatureFlags, ['show-passkeys']);
@@ -3,12 +3,13 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.useIsPasskeysEnabled = void 0;
6
+ exports.getPasskeysVendorPolicy = void 0;
7
7
  var _restApi = require("@frontegg/rest-api");
8
- const useIsPasskeysEnabled = policy => {
9
- return !!(policy != null && policy.secondaryAuthStrategies.some(({
8
+ const getPasskeysVendorPolicy = policy => {
9
+ var _policy$secondaryAuth;
10
+ return !!(policy != null && (_policy$secondaryAuth = policy.secondaryAuthStrategies) != null && _policy$secondaryAuth.some(({
10
11
  isActive,
11
12
  strategy
12
13
  }) => isActive && strategy === _restApi.SecondaryAuthStrategy.Passkeys));
13
14
  };
14
- exports.useIsPasskeysEnabled = useIsPasskeysEnabled;
15
+ exports.getPasskeysVendorPolicy = getPasskeysVendorPolicy;
package/node/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license Frontegg v6.84.0-alpha.0
1
+ /** @license Frontegg v6.84.0-alpha.1
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.84.0-alpha.0",
3
+ "version": "6.84.0-alpha.1",
4
4
  "main": "./node/index.js",
5
5
  "license": "MIT",
6
6
  "author": "Frontegg LTD",