diff --git a/users/authservice/auth-service.js b/users/authservice/auth-service.js index 78cf649b..df14dcf6 100644 --- a/users/authservice/auth-service.js +++ b/users/authservice/auth-service.js @@ -32,7 +32,7 @@ app.post('/login', async (req, res) => { const { username, password } = req.body; // Find the user by username in the database - const user = await User.findOne({ username }); + const user = await User.findOne({ username:username.toString() }); // Check if the user exists and verify the password if (user && await bcrypt.compare(password, user.password)) {