Answer the question
In order to leave comments, you need to log in
How to switch from meteor accounts-password to plain bcrypt?
We need to move from meteor to express 4. Now the task is to move away from the meteor accounts-password package and move to bcrypt (since accounts-password is based on bcrypt). The problem is that bcrypt and accounts-password generates a hash similar in structure to me, but it still does not pass bcrypt.compare. Please tell me how to fix it.
Answer the question
In order to leave comments, you need to log in
In Meteor JS, the password is first hashed with SHA-256
before being sent to the bcrypt_compare function , so your code should look something like this
password_verify(hash('sha256', $password), $bcrypt_hash_from_db)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question