From c31ff1f679aba108a8d7219543f11304d1038849 Mon Sep 17 00:00:00 2001 From: "Timothy J. Baek" Date: Wed, 27 Dec 2023 19:10:56 -0800 Subject: [PATCH] fix: save email as lowercase --- backend/apps/web/routers/auths.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/backend/apps/web/routers/auths.py b/backend/apps/web/routers/auths.py index 02b77248c..27d6a3b6a 100644 --- a/backend/apps/web/routers/auths.py +++ b/backend/apps/web/routers/auths.py @@ -88,7 +88,9 @@ async def signup(form_data: SignupForm): try: role = "admin" if Users.get_num_users() == 0 else "pending" hashed = get_password_hash(form_data.password) - user = Auths.insert_new_auth(form_data.email, hashed, form_data.name, role) + user = Auths.insert_new_auth( + form_data.email.lower(), hashed, form_data.name, role + ) if user: token = create_token(data={"email": user.email})