Question : react password hashing
Answered by : helpless-horse-myzxbasz0y0a
//hash password
const hashedPassword = bcrypt.hashSync(yourPasswordFromSignupForm, bcrypt.genSaltSync());
//verify password
const doesPasswordMatch = bcrypt.compareSync(yourPasswordFromLoginForm, yourHashedPassword)
Source : https://dev.to/silvenleaf/password-hashing-with-bcrypt-easiest-explanation-5gpg | Last Update : Wed, 20 Oct 21