1

I have a forum which is running Invision Community and I'm building an API using Express.JS and Prisma to query the database.

When I do a POST request with my username and password (all info sent are correct) and I extract the hashed password from the database to compare but I always get back false.

I do like this:

const isValid = await bcrypt.compare("Test123123", "$2y$10$IPu20eKbJ1I7WcsWnuSq1u9NlcYhVRgdUWSHoENNH2fguhca8K2py")

Any ideas on why I always get back false?

StreY
  • 53
  • 4
  • 1. See https://stackoverflow.com/questions/36041533/2y-bcrypt-hashes-in-node-js / 2. Is that other software using a global hash salt, also known as "pepper"? – Robert Kawecki Nov 11 '21 at 01:11
  • @RobertKawecki Thank you, that post solved my issue. When I use: ``twin-bcrypt`` it works fine! – StreY Nov 11 '21 at 01:27

0 Answers0