title: nodejs - how to compare two hashes password of bcrypt
body: <p>Hello I need some help with this issue after I search the solution and I have not found yet,</p>
  
  <p>I want to compare 2 hash password with bcrypt of the same password, 
  how do I do it? </p>
  
  <p>for example: </p>
  
  <p>I have these 2 hash password that came from the same password in bcrypt: </p>
  
  <pre><code>var password = E@Js#07Do=U$
  var hash1 = $2a$10$fKAyjaG0pCkisZfRpKsBxursD6QigXQpm1TaPBDZ4KhIZRguYPKHe
  var hash2 = $2a$10$mgApOcRIp7RSK3lRIIlQ5e/GjVFbxAFytGAEc0Bo17..r8v2pPR22
  // that's not working for me
  bcrypt.compare(passwordHash, userPasswordLoginHash, function(err, isMatch) {
     if (err) throw err;
     if(isMatch){
        console.log('correct password!')
     }
     callback(null, isMatch);
  });
  </code></pre>
  
  <p>how can i compare them, to determine that they came from the same password, by using bcryptjs npm package? </p>