🐛 Print user.name instead of id on auth.
This commit is contained in:
+3
-3
@@ -157,15 +157,15 @@ export const constructAuthOptions = (
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
Consola.log(`user ${user.id} is trying to log in. checking password...`);
|
Consola.log(`user ${user.name} is trying to log in. checking password...`);
|
||||||
const isValidPassword = await bcrypt.compare(data.password, user.password);
|
const isValidPassword = await bcrypt.compare(data.password, user.password);
|
||||||
|
|
||||||
if (!isValidPassword) {
|
if (!isValidPassword) {
|
||||||
Consola.log(`password for user ${user.id} was incorrect`);
|
Consola.log(`password for user ${user.name} was incorrect`);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
Consola.log(`user ${user.id} successfully authorized`);
|
Consola.log(`user ${user.name} successfully authorized`);
|
||||||
|
|
||||||
return {
|
return {
|
||||||
id: user.id,
|
id: user.id,
|
||||||
|
|||||||
Reference in New Issue
Block a user