Skip to content

Instantly share code, notes, and snippets.

@nosvalds
Created October 18, 2020 15:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nosvalds/7c3da6ff93e2076ec2c235f0b1f5d52d to your computer and use it in GitHub Desktop.
Save nosvalds/7c3da6ff93e2076ec2c235f0b1f5d52d to your computer and use it in GitHub Desktop.
function that compares a provided password with the trusted password
const bcrypt = require('bcryptjs')
/**
* Compare password
*/
const comparePassword = (candidatePassword, trustedPassword) => {
return bcrypt.compareSync(candidatePassword, trustedPassword)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment