Information Security with HelmetJS - Hash and Compare Passwords Asynchronously

Tell us what’s happening:
Hi guys, even if following the guide, I am still receiving error accordingly my code below:
//START_ASYNC -do not remove notes, place code between correct pair of notes.
bcrypt.hash(myPlaintextPassword, saltRounds, (err, hash) => {
console.log(hash);
bcrypt.compare(myPlaintextPassword, hash, (err, res) => {
console.log(res);
});
});
//END_ASYNC

Your project link(s)

solution: boilerplate-bcrypt - Replit

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36

Challenge: Information Security with HelmetJS - Hash and Compare Passwords Asynchronously

Link to the challenge:

Your bcrypt install seems to be broken.

Open the Shell tab and run

npm rm bcrypt

Then reinstall it

npm i bcrypt

1 Like

You are a genius! Can I give you a hug?

Thank you so much! IT WORKED!

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.