From 21dee6ba306699b4664fb7ffc8dd1382ef7b4537 Mon Sep 17 00:00:00 2001 From: Mihaly Lengyel Date: Fri, 17 Nov 2023 00:12:22 +0100 Subject: [PATCH] fix: add missing param into redirectToFactorChooser call --- lib/build/passwordless-shared3.js | 4 ++-- lib/ts/recipe/passwordless/components/features/mfa/index.tsx | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/build/passwordless-shared3.js b/lib/build/passwordless-shared3.js index e52c29a1a..0cd63d619 100644 --- a/lib/build/passwordless-shared3.js +++ b/lib/build/passwordless-shared3.js @@ -3702,7 +3702,7 @@ function useChildProps$1(recipe$1, recipeImplementation, state, contactMethod, u return history(-1); }, onFactorChooserButtonClicked: function () { - return recipe$2.MultiFactorAuth.getInstanceOrThrow().redirectToFactorChooser(history); + return recipe$2.MultiFactorAuth.getInstanceOrThrow().redirectToFactorChooser(false, history); }, recipeImplementation: recipeImplementation, config: recipe$1.config, @@ -3803,7 +3803,7 @@ function useOnLoad(props, recipeImplementation, dispatch, userContext) { }); }); }, - [props.recipe, userContext] + [userContext] ); var handleLoadError = React__namespace.useCallback( function () { diff --git a/lib/ts/recipe/passwordless/components/features/mfa/index.tsx b/lib/ts/recipe/passwordless/components/features/mfa/index.tsx index 70d90ccd0..000a8e2eb 100644 --- a/lib/ts/recipe/passwordless/components/features/mfa/index.tsx +++ b/lib/ts/recipe/passwordless/components/features/mfa/index.tsx @@ -200,7 +200,7 @@ export function useChildProps( return history(-1); }, onFactorChooserButtonClicked: () => { - return MultiFactorAuth.getInstanceOrThrow().redirectToFactorChooser(history); + return MultiFactorAuth.getInstanceOrThrow().redirectToFactorChooser(false, history); }, recipeImplementation: recipeImplementation, config: recipe.config, @@ -292,7 +292,7 @@ function useOnLoad( ) { const fetchMFAInfo = React.useCallback( async () => MultiFactorAuth.getInstanceOrThrow().webJSRecipe.getMFAInfo({ userContext }), - [props.recipe, userContext] + [userContext] ); const handleLoadError = React.useCallback( () => dispatch({ type: "setError", error: "SOMETHING_WENT_WRONG_ERROR" }),