diff --git a/ui/src/pages/Auth.tsx b/ui/src/pages/Auth.tsx index e562c7e8..7f794a70 100644 --- a/ui/src/pages/Auth.tsx +++ b/ui/src/pages/Auth.tsx @@ -57,8 +57,8 @@ export function AuthPage() { const canSubmit = email.trim().length > 0 && - password.trim().length >= 8 && - (mode === "sign_in" || name.trim().length > 0); + password.trim().length > 0 && + (mode === "sign_in" || (name.trim().length > 0 && password.trim().length >= 8)); if (isSessionLoading) { return ( @@ -91,6 +91,11 @@ export function AuthPage() { className="mt-6 space-y-4" onSubmit={(event) => { event.preventDefault(); + if (mutation.isPending) return; + if (!canSubmit) { + setError("Please fill in all required fields."); + return; + } mutation.mutate(); }} > @@ -128,7 +133,12 @@ export function AuthPage() { /> {error &&
{error}
} -