Skip to content

Commit 0404d22

Browse files
Add fixes for properly showing the create a passkey form in token recovery screen
1 parent e3a6d63 commit 0404d22

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ import { ComponentOverrideContext } from "../../../../../components/componentOve
1919
import FeatureWrapper from "../../../../../components/featureWrapper";
2020
import SuperTokens from "../../../../../superTokens";
2121
import { getQueryParams } from "../../../../../utils";
22-
import { defaultTranslationsEmailPassword } from "../../../../emailpassword/components/themes/translations";
2322
import RecoverAccountWithToken from "../../themes/recoverAccountWithToken";
23+
import { defaultTranslationsWebauthn } from "../../themes/translations";
2424

2525
import type { RecoverAccountWithTokenProps } from "../../../types";
2626

@@ -48,7 +48,7 @@ export const RecoverAccountUsingToken: React.FC<RecoverAccountWithTokenProps> =
4848
<ComponentOverrideContext.Provider value={recipeComponentOverrides}>
4949
<FeatureWrapper
5050
useShadowDom={SuperTokens.getInstanceOrThrow().useShadowDom}
51-
defaultStore={defaultTranslationsEmailPassword}>
51+
defaultStore={defaultTranslationsWebauthn}>
5252
<React.Fragment>
5353
{/* No custom theme, use default. */}
5454
{props.children === undefined && <RecoverAccountWithToken {...childProps} />}

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ const RecoverAccountThemeInner = (
9696
isLoading={false}
9797
onFetchError={() => {}}
9898
resetFactorList={() => {}}
99+
hideContinueWithoutPasskey
99100
/>
100101
) : props.activeScreen === RecoverAccountScreen.Success ? (
101102
<div></div>

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ export const PasskeyConfirmation = withOverride(
3131
onContinueClick: () => void;
3232
errorMessageLabel?: string;
3333
isLoading: boolean;
34+
hideContinueWithoutPasskey?: boolean;
3435
}
3536
): JSX.Element {
3637
const t = useTranslation();
@@ -53,7 +54,7 @@ export const PasskeyConfirmation = withOverride(
5354
onClick={props.onContinueClick}
5455
label="WEBAUTHN_EMAIL_CONTINUE_BUTTON"
5556
/>
56-
<ContinueWithoutPasskey onClick={props.resetFactorList} />
57+
{!props.hideContinueWithoutPasskey && <ContinueWithoutPasskey onClick={props.resetFactorList} />}
5758
</div>
5859
</div>
5960
);

0 commit comments

Comments
 (0)