mirror of
https://github.com/Ravinou/borgwarehouse
synced 2024-06-17 13:15:22 +02:00
fix: login case insensitive
This commit is contained in:
parent
c6f8f3cf7c
commit
e4b8ab2d33
|
@ -42,7 +42,7 @@ export const authOptions = {
|
||||||
//Step 1 : does the user exist ?
|
//Step 1 : does the user exist ?
|
||||||
const userIndex = usersList
|
const userIndex = usersList
|
||||||
.map((user) => user.username)
|
.map((user) => user.username)
|
||||||
.indexOf(username);
|
.indexOf(username.toLowerCase());
|
||||||
if (userIndex === -1) {
|
if (userIndex === -1) {
|
||||||
throw new Error('Incorrect credentials.');
|
throw new Error('Incorrect credentials.');
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue