how bcrypt compare works code example
Example: bcrypt compare with hash
// password: the value passed from the password form input
// hash: the value requested from the database. This is the "encrypted" password
bcrypt.compare(password, hash).then(validPass => {
// validPass returns true or false
}.catch(err => console.log('error: ' + err));