hash password in node.js

علی ذوالفقار
1401/09/05 18:12:37 (380)
use bcrypt packgae to hash and compare passwords : 

hash : 
await bcrypt.hash(req.body.password,10)

compare : 
await bcrypt.compare(req.body.password, db.passwordHash)

Back