Fix login form not being detected by 1Password
Add name, id, and htmlFor attributes to form inputs and a method/action to the form element so password managers can properly identify the login form fields. Co-Authored-By: Paperclip <noreply@paperclip.ing> Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
f8dd4dcb30
commit
cd7c6ee751
1 changed files with 11 additions and 3 deletions
|
|
@ -89,6 +89,8 @@ export function AuthPage() {
|
||||||
|
|
||||||
<form
|
<form
|
||||||
className="mt-6 space-y-4"
|
className="mt-6 space-y-4"
|
||||||
|
method="post"
|
||||||
|
action="/api/auth/sign-in/email"
|
||||||
onSubmit={(event) => {
|
onSubmit={(event) => {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
if (mutation.isPending) return;
|
if (mutation.isPending) return;
|
||||||
|
|
@ -101,8 +103,10 @@ export function AuthPage() {
|
||||||
>
|
>
|
||||||
{mode === "sign_up" && (
|
{mode === "sign_up" && (
|
||||||
<div>
|
<div>
|
||||||
<label className="text-xs text-muted-foreground mb-1 block">Name</label>
|
<label htmlFor="name" className="text-xs text-muted-foreground mb-1 block">Name</label>
|
||||||
<input
|
<input
|
||||||
|
id="name"
|
||||||
|
name="name"
|
||||||
className="w-full rounded-md border border-border bg-transparent px-3 py-2 text-sm outline-none focus:ring-1 focus:ring-ring placeholder:text-muted-foreground/50"
|
className="w-full rounded-md border border-border bg-transparent px-3 py-2 text-sm outline-none focus:ring-1 focus:ring-ring placeholder:text-muted-foreground/50"
|
||||||
value={name}
|
value={name}
|
||||||
onChange={(event) => setName(event.target.value)}
|
onChange={(event) => setName(event.target.value)}
|
||||||
|
|
@ -112,8 +116,10 @@ export function AuthPage() {
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
<div>
|
<div>
|
||||||
<label className="text-xs text-muted-foreground mb-1 block">Email</label>
|
<label htmlFor="email" className="text-xs text-muted-foreground mb-1 block">Email</label>
|
||||||
<input
|
<input
|
||||||
|
id="email"
|
||||||
|
name="email"
|
||||||
className="w-full rounded-md border border-border bg-transparent px-3 py-2 text-sm outline-none focus:ring-1 focus:ring-ring placeholder:text-muted-foreground/50"
|
className="w-full rounded-md border border-border bg-transparent px-3 py-2 text-sm outline-none focus:ring-1 focus:ring-ring placeholder:text-muted-foreground/50"
|
||||||
type="email"
|
type="email"
|
||||||
value={email}
|
value={email}
|
||||||
|
|
@ -123,8 +129,10 @@ export function AuthPage() {
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<label className="text-xs text-muted-foreground mb-1 block">Password</label>
|
<label htmlFor="password" className="text-xs text-muted-foreground mb-1 block">Password</label>
|
||||||
<input
|
<input
|
||||||
|
id="password"
|
||||||
|
name="password"
|
||||||
className="w-full rounded-md border border-border bg-transparent px-3 py-2 text-sm outline-none focus:ring-1 focus:ring-ring placeholder:text-muted-foreground/50"
|
className="w-full rounded-md border border-border bg-transparent px-3 py-2 text-sm outline-none focus:ring-1 focus:ring-ring placeholder:text-muted-foreground/50"
|
||||||
type="password"
|
type="password"
|
||||||
value={password}
|
value={password}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue