Skip to content

Commit

Permalink
fix: Allow username to be capitalized on basic credentials login (#1585)
Browse files Browse the repository at this point in the history
  • Loading branch information
SeDemal authored Dec 2, 2024
1 parent 0e01dd8 commit a1a6dc9
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export const authorizeWithBasicCredentialsAsync = async (
credentials: z.infer<typeof validation.user.signIn>,
) => {
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) {
Expand Down

0 comments on commit a1a6dc9

Please sign in to comment.