From 16f2ce378b121dcbea31708630def8ff95e90f14 Mon Sep 17 00:00:00 2001
From: Zach <sweepyoface@gmail.com>
Date: Thu, 19 Dec 2024 09:36:07 -0800
Subject: fix: trim whitespace from email on signin page (#714)

* fix: trim whitespace from email

* fix: trim email in setter

Co-authored-by: Mohamed Bassem <me@mbassem.com>

---------

Co-authored-by: Mohamed Bassem <me@mbassem.com>
---
 apps/web/components/signin/CredentialsForm.tsx | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

(limited to 'apps/web/components/signin/CredentialsForm.tsx')

diff --git a/apps/web/components/signin/CredentialsForm.tsx b/apps/web/components/signin/CredentialsForm.tsx
index 313dc7c5..6a1bf985 100644
--- a/apps/web/components/signin/CredentialsForm.tsx
+++ b/apps/web/components/signin/CredentialsForm.tsx
@@ -65,7 +65,7 @@ function SignIn() {
         onSubmit={form.handleSubmit(async (value) => {
           const resp = await signIn("credentials", {
             redirect: false,
-            email: value.email,
+            email: value.email.trim(),
             password: value.password,
           });
           if (!resp || !resp?.ok) {
@@ -146,7 +146,7 @@ function SignUp() {
           }
           const resp = await signIn("credentials", {
             redirect: false,
-            email: value.email,
+            email: value.email.trim(),
             password: value.password,
           });
           if (!resp || !resp.ok) {
-- 
cgit v1.2.3-70-g09d2

