You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I can't seem to figure out what the issue might be. I've tried checking typeof for both email and password and they are indeed Strings. Does anybody know what could be the issue.
The text was updated successfully, but these errors were encountered:
Hello @syedmkazmi , I had the same problem and found the cause. My user model did not have to have a valid password (if users logged in with social accounts) so the problem was at validPassword method of user schema. In order for bcrypt compare to work, you have to have a bcrypt hashed string password.
You are a god @CanGokdere . I overlooked this before moving to production and suddenly the app started crashing and without much information in the log regarding the issue. Thank you so much for saving my butt here!
Im using passport.js (local strategy) to authenticate users but I am getting the following error:
Unhandled "error" event. (Incorrect arguments)
index.js file:
Authentication.js file:
Passport.js File:
I can't seem to figure out what the issue might be. I've tried checking typeof for both email and password and they are indeed Strings. Does anybody know what could be the issue.
The text was updated successfully, but these errors were encountered: