fix: login case insensitive

This commit is contained in:
Ravinou 2024-02-10 10:41:03 +01:00
parent c6f8f3cf7c
commit e4b8ab2d33
No known key found for this signature in database
GPG key ID: EEEE670C40F6A4D7

View file

@ -42,7 +42,7 @@ export const authOptions = {
//Step 1 : does the user exist ?
const userIndex = usersList
.map((user) => user.username)
.indexOf(username);
.indexOf(username.toLowerCase());
if (userIndex === -1) {
throw new Error('Incorrect credentials.');
}