Skip to content

A self-hostable bookmark-everything app (links, notes and images) with AI-based automatic tagging and full text search

fix: trim whitespace from email on signin page (#714)

Zach16f2ce378b12
diff --git a/apps/mobile/app/signin.tsx b/apps/mobile/app/signin.tsx
index df0c2e5f..6119f0f8 100644
--- a/apps/mobile/app/signin.tsx
+++ b/apps/mobile/app/signin.tsx
@@ -123,7 +123,7 @@ export default function Signin() {
autoCapitalize="none"
value={usernameFormData.email}
onChangeText={(e) =>
- setUserNameFormData((s) => ({ ...s, email: e }))
+ setUserNameFormData((s) => ({ ...s, email: e.trim() }))
}
/>
</View>
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) {