Skip to content

Commit 64dbfd5

Browse files
committed
More attributes
1 parent a2358de commit 64dbfd5

File tree

3 files changed

+30
-3
lines changed

3 files changed

+30
-3
lines changed

src/app/using-your-own-ui/mfa/page.tsx

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,16 @@ export default function Mfa() {
7676
<form action={verifyAction}>
7777
<div>
7878
<label htmlFor="code">Enter the code from your app</label>
79-
<input name="code" id="code" autoFocus required />
79+
<input
80+
type="text"
81+
name="code"
82+
id="code"
83+
inputMode="numeric"
84+
autoComplete="one-time-code"
85+
pattern="^\d{6}$"
86+
autoFocus
87+
required
88+
/>
8089
</div>
8190

8291
<input

src/app/using-your-own-ui/sign-in/magic-auth/page.tsx

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,16 @@ export default function SignInWithMagicAuth() {
4848
<form action={signInAction}>
4949
<div>
5050
<label htmlFor="code">Enter code from the email</label>
51-
<input type="text" name="code" id="code" autoFocus required />
51+
<input
52+
type="text"
53+
name="code"
54+
id="code"
55+
inputMode="numeric"
56+
autoComplete="one-time-code"
57+
pattern="^\d{6}$"
58+
autoFocus
59+
required
60+
/>
5261
</div>
5362

5463
<input type="hidden" name="userId" value={sendCodeState.user.id} />

src/app/using-your-own-ui/verify-email/page.tsx

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,16 @@ export default function VerifyEmail() {
4646
<form action={verifyEmailAction}>
4747
<div>
4848
<label htmlFor="code">Enter code from the email</label>
49-
<input type="text" name="code" id="code" autoFocus required />
49+
<input
50+
type="text"
51+
name="code"
52+
id="code"
53+
inputMode="numeric"
54+
autoComplete="one-time-code"
55+
pattern="^\d{6}$"
56+
autoFocus
57+
required
58+
/>
5059
</div>
5160

5261
<input type="hidden" name="userId" value={sendCodeState.user.id} />

0 commit comments

Comments
 (0)