Skip to content

Commit 2a9f4c3

Browse files
Add support for continue without passkey link below continue button
1 parent d51fd35 commit 2a9f4c3

File tree

3 files changed

+28
-2
lines changed

3 files changed

+28
-2
lines changed

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

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,16 @@ export const SignUpForm = withOverride(
3232
): JSX.Element {
3333
const t = useTranslation();
3434

35+
const defaultFooter = (
36+
<div data-supertokens="continueWithoutPasskey">
37+
<a
38+
onClick={() => alert("That is not defined yet!")}
39+
data-supertokens="formLabelLinkBtn continueWithoutPasskeyLabel">
40+
{t("WEBAUTHN_CONTINUE_WITHOUT_PASSKEY_BUTTON")}
41+
</a>
42+
</div>
43+
);
44+
3545
return (
3646
<FormBase
3747
clearError={props.clearError}
@@ -71,7 +81,7 @@ export const SignUpForm = withOverride(
7181
}}
7282
validateOnBlur={false}
7383
showLabels={true}
74-
footer={props.footer}
84+
footer={props.footer || defaultFooter}
7585
/>
7686
);
7787
}

lib/ts/recipe/webauthn/components/themes/styles.css

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,19 @@
88
[data-supertokens~="continueWithPasskeyButtonWrapper"] {
99
margin: 9px 0;
1010
}
11+
12+
[data-supertokens~="continueWithoutPasskey"] {
13+
margin-top: 15px;
14+
}
15+
16+
[data-supertokens~="continueWithoutPasskey"] [data-supertokens~="continueWithoutPasskeyLabel"] {
17+
font-family: Arial;
18+
font-size: 14px;
19+
font-weight: 700;
20+
line-height: 21px;
21+
text-align: center;
22+
text-underline-position: from-font;
23+
text-decoration-skip-ink: none;
24+
color: #0076ff;
25+
cursor: pointer;
26+
}

lib/ts/recipe/webauthn/components/themes/translations.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ export const defaultTranslationsWebauthn = {
66
WEBAUTHN_EMAIL_CONTINUE_BUTTON: "Continue",
77
WEBAUTHN_SIGN_UP_LABEL: "Email",
88
WEBAUTHN_RECOVER_ACCOUNT_LABEL: "Recover Account",
9-
// WEBAUTHN_CONTINUE_WITHOUT_PASSKEY_BUTTON: "Continue without passkey",
9+
WEBAUTHN_CONTINUE_WITHOUT_PASSKEY_BUTTON: "Continue without passkey",
1010
// WEBAUTHN_CREATE_A_PASSKEY_HEADER: "Create a passkey",
1111
// WEBAUTHN_CONTINUE_WITH_EMAIL_SUBTEXT: "Continue with",
1212
WEBAUTHN_COMBO_CONTINUE_WITH_PASSKEY_BUTTON: "CONTINUE WITH PASSKEY",

0 commit comments

Comments
 (0)