fix: Allow username to be capitalized on basic credentials login (#1585)

This commit is contained in:
SeDemal
2024-12-02 20:44:49 +01:00
committed by GitHub
parent 0e01dd8695
commit a1a6dc9d6e

View File

@@ -11,7 +11,7 @@ export const authorizeWithBasicCredentialsAsync = async (
credentials: z.infer<typeof validation.user.signIn>, credentials: z.infer<typeof validation.user.signIn>,
) => { ) => {
const user = await db.query.users.findFirst({ const user = await db.query.users.findFirst({
where: and(eq(users.name, credentials.name), eq(users.provider, "credentials")), where: and(eq(users.name, credentials.name.toLowerCase()), eq(users.provider, "credentials")),
}); });
if (!user?.password) { if (!user?.password) {