Closed justinjwlee closed 9 years ago
Sorry it was entirely my own issue. Rectified & closed
i am faceing the same problem - what was your mistake? maybe its mine too...
edit: solved it, my issue was, that i had datatype CHAR instead of STRING for my password - but in console.log and my database i could not visual see any difference
if you're using mongoose and using bcrypt hash in the pre-save method of mongoose in the models, make sure in your function you're only calling 'save' once. If not hash will be called more than once which will naturally fail bcrypt compare.
Again, this is my own error entirely unrelated to bcrypt
On Sun, May 24, 2015 at 11:18 AM ms88privat notifications@github.com wrote:
i am faceing the same problem - what was your mistake? maybe its mine too...
— Reply to this email directly or view it on GitHub https://github.com/shaneGirish/bcrypt-nodejs/issues/45#issuecomment-104972572 .
thanks you, i was having a similar mistake.
Hi there,
I'm implementing user authentication using bcrypt. Bcrypt compare is returning false despite the password being correct. Interestingly, bcrypt compare works on a local db but not on a hosted remote db. (not a password string length issue) Any idea what might be the problem?