Hello, I have made a login system with passports, and i was wondering why it isn't working properly.
So when i try to log in the first time, everything works, then i logout, and it actually logs out for me.
Then i try to log in with a different account, first it finishes all of the code, and uses the user i have given to him, but then for some reason when it gets here: "(req, res, next);" in the login part, it goes to the function findUser again, and looks for the username of the first user.
then it logs me in the 1st user instead of the second one.
anyone has any idea why?
note: the main app.js isn't the full part just the thing thats needed.