Tell us what’s happening:
Keep getting error Async hash should be generated and correctly compared.
bcrypt.hash(myPlaintextPassword, 12, (err, hash) => {
console.log(hash);
//$2a$12$Y.PHPE15wR25qrrtgGkiYe2sXo98cjuMCG1YwSI5rJW1DSJp0gEYS
bcrypt.compare(myPlaintextPassword, hash, (err, res) => {
console.log(res); //true
});
});
Your project link(s)
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36
Challenge: Information Security with HelmetJS - Hash and Compare Passwords Asynchronously
Link to the challenge: