fix: Allow username to be capitalized on basic credentials login (#1585)
This commit is contained in:
1 parent
0e01dd8695
commit
a1a6dc9d6e
1 file changed
+1
-1
@@ -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) {
|
||||||
|
|||||||
Reference in new issue
Block a user