Skip to content

🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.

chore(ui): show 1pass modal only for sign-up/sign-in input fields (#11530)

marliessophieca24bebccd78
diff --git a/web/src/components/ui/input.tsx b/web/src/components/ui/input.tsx
index d15134e799..b3e9e10fdd 100644
--- a/web/src/components/ui/input.tsx
+++ b/web/src/components/ui/input.tsx
@@ -3,12 +3,15 @@ import * as React from "react";
import { cn } from "@/src/utils/tailwind";
export interface InputProps
- extends React.InputHTMLAttributes<HTMLInputElement> {}
+ extends React.InputHTMLAttributes<HTMLInputElement> {
+ allowPasswordManager?: boolean;
+}
const Input = React.forwardRef<HTMLInputElement, InputProps>(
- ({ className, type, ...props }, ref) => {
+ ({ className, type, allowPasswordManager = false, ...props }, ref) => {
return (
<input
+ {...(!allowPasswordManager && { "data-1p-ignore": true })}
type={type}
className={cn(
"flex h-8 w-full min-w-14 rounded-md border border-input bg-background px-2 py-1 text-sm file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus:ring-0 focus-visible:ring-offset-0 disabled:cursor-not-allowed disabled:opacity-50",
diff --git a/web/src/features/auth-credentials/components/ResetPasswordPage.tsx b/web/src/features/auth-credentials/components/ResetPasswordPage.tsx
index 4e83ceb00f..0675ed0081 100644
--- a/web/src/features/auth-credentials/components/ResetPasswordPage.tsx
+++ b/web/src/features/auth-credentials/components/ResetPasswordPage.tsx
@@ -149,6 +149,8 @@ export function ResetPasswordPage({
<Input
placeholder="[email protected]"
disabled={session.status === "authenticated"}
+ allowPasswordManager
+ autoComplete="email"
{...field}
/>
{emailVerified.verified && (
@@ -171,7 +173,10 @@ export function ResetPasswordPage({
<FormItem>
<FormLabel>New Password</FormLabel>
<FormControl>
- <PasswordInput {...field} />
+ <PasswordInput
+ autoComplete="new-password"
+ {...field}
+ />
</FormControl>
<FormMessage />
</FormItem>
@@ -184,7 +189,10 @@ export function ResetPasswordPage({
<FormItem>
<FormLabel>Confirm New Password</FormLabel>
<FormControl>
- <PasswordInput {...field} />
+ <PasswordInput
+ autoComplete="new-password"
+ {...field}
+ />
</FormControl>
<FormMessage />
</FormItem>
diff --git a/web/src/pages/auth/enterprise-sso-required.tsx b/web/src/pages/auth/enterprise-sso-required.tsx
index c34bfbae38..0e07748e39 100644
--- a/web/src/pages/auth/enterprise-sso-required.tsx
+++ b/web/src/pages/auth/enterprise-sso-required.tsx
@@ -165,6 +165,7 @@ export default function EnterpriseSsoRequiredPage() {
<FormControl>
<Input
placeholder="[email protected]"
+ allowPasswordManager
autoComplete="email"
{...field}
/>
diff --git a/web/src/pages/auth/sign-in.tsx b/web/src/pages/auth/sign-in.tsx
index bca0d80492..b16f11168b 100644
--- a/web/src/pages/auth/sign-in.tsx
+++ b/web/src/pages/auth/sign-in.tsx
@@ -750,7 +750,12 @@ export default function SignIn({
<FormItem>
<FormLabel>Email</FormLabel>
<FormControl>
- <Input placeholder="[email protected]" {...field} />
+ <Input
+ placeholder="[email protected]"
+ allowPasswordManager
+ autoComplete="email"
+ {...field}
+ />
</FormControl>
<FormMessage />
</FormItem>
diff --git a/web/src/pages/auth/sign-up.tsx b/web/src/pages/auth/sign-up.tsx
index 0e8c00742a..444acc896e 100644
--- a/web/src/pages/auth/sign-up.tsx
+++ b/web/src/pages/auth/sign-up.tsx
@@ -246,7 +246,12 @@ export default function SignIn({
<FormItem>
<FormLabel>Email</FormLabel>
<FormControl>
- <Input placeholder="[email protected]" {...field} />
+ <Input
+ placeholder="[email protected]"
+ allowPasswordManager
+ autoComplete="email"
+ {...field}
+ />
</FormControl>
<FormMessage />
</FormItem>