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
Just install 'bcrypt' if not already or check if already installed. npm i bcrypt
Now, in your vidly-api-node folder goto routes folder and open up users.js in your code editor. and change this code (probably on line 21 & 22): const salt = await bcrypt.genSalt(10); user.password = await bcrypt.hash(user.password, salt);
with this: const saltRounds = 10; const myPlaintextPassword = user.password; const bcrypt = require("bcrypt"); const salt = bcrypt.genSaltSync(saltRounds); const hash = bcrypt.hashSync(myPlaintextPassword, salt); user.password = hash;
Save the file and you are good to go :)
The text was updated successfully, but these errors were encountered:
Just install 'bcrypt' if not already or check if already installed.
npm i bcrypt
Now, in your vidly-api-node folder goto routes folder and open up users.js in your code editor. and change this code (probably on line 21 & 22):
const salt = await bcrypt.genSalt(10); user.password = await bcrypt.hash(user.password, salt);
with this:
const saltRounds = 10; const myPlaintextPassword = user.password; const bcrypt = require("bcrypt"); const salt = bcrypt.genSaltSync(saltRounds); const hash = bcrypt.hashSync(myPlaintextPassword, salt); user.password = hash;
Save the file and you are good to go :)
The text was updated successfully, but these errors were encountered: