From 1043b31cc7c0418530da8ac34c42af49769bcc66 Mon Sep 17 00:00:00 2001 From: Mihai C <34626017+mihaic195@users.noreply.github.com> Date: Mon, 25 Oct 2021 11:55:28 +0300 Subject: [PATCH] fix: lowercase email when loggin in (#1038) --- pages/api/auth/[...nextauth].tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/api/auth/[...nextauth].tsx b/pages/api/auth/[...nextauth].tsx index 68c5140e67..c13174691d 100644 --- a/pages/api/auth/[...nextauth].tsx +++ b/pages/api/auth/[...nextauth].tsx @@ -29,7 +29,7 @@ export default NextAuth({ async authorize(credentials) { const user = await prisma.user.findUnique({ where: { - email: credentials.email, + email: credentials.email.toLowerCase(), }, });