I am stuck while hashing my password. Here is my code :
const salt = await bcrypt.gentSalt(10);
const hashPassword = await bcrypt.hash(req.body.password, salt);
This is my user body data code:
const user = new User({
name: req.body.name,
email: req.body.email,
password: hashPassword,
});
Aucun commentaire:
Enregistrer un commentaire