Skip to content

Commit 48a7aac

Browse files
Add some component fixes for the original factor IDs being passed
1 parent 735bc6a commit 48a7aac

File tree

3 files changed

+19
-3
lines changed

3 files changed

+19
-3
lines changed

lib/build/webauthnprebuiltui.js

Lines changed: 12 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/ts/recipe/webauthn/components/themes/recoverAccountWithToken/index.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -272,6 +272,7 @@ const RecoverAccountThemeInner = (
272272
isLoading={props.isLoading}
273273
hideContinueWithoutPasskey
274274
isContinueDisabled={props.isContinueDisabled}
275+
originalFactorIds={[]} // Doesn't matter since we anyway hide the button
275276
/>
276277
) : props.activeScreen === RecoverAccountScreen.Success ? (
277278
<PasskeyRecoverAccountSuccess />

lib/ts/recipe/webauthn/components/themes/signUp/confirmation.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* under the License.
1414
*/
1515

16-
import { useEffect } from "react";
16+
import { useEffect, useMemo } from "react";
1717
import { useState } from "react";
1818

1919
import { withOverride } from "../../../../../components/componentOverride/withOverride";
@@ -42,6 +42,10 @@ export const PasskeyConfirmation = withOverride(
4242
const t = useTranslation();
4343

4444
const [isPasskeySupported, setIsPasskeySupported] = useState(false);
45+
const showContinueWithoutPasskey = useMemo(
46+
() => props.hideContinueWithoutPasskey !== true && (props.originalFactorIds ?? []).length > 1,
47+
[props]
48+
);
4549

4650
useEffect(() => {
4751
void (async () => {
@@ -77,7 +81,7 @@ export const PasskeyConfirmation = withOverride(
7781
isGreyedOut={!isPasskeySupported}
7882
/>
7983
{!isPasskeySupported && <PasskeyNotSupportedError />}
80-
{!props.hideContinueWithoutPasskey && props.resetFactorList !== undefined && (
84+
{showContinueWithoutPasskey && props.resetFactorList !== undefined && (
8185
<ContinueWithoutPasskey onClick={props.resetFactorList} />
8286
)}
8387
</div>

0 commit comments

Comments
 (0)