Question · NestJS course · Module 4: Authentication

bcrypt.compare method

What is bcrypt.compare() used for in the login process?

Answer options

  • Compares two hashes with each other
  • Compares versions of the bcrypt library
  • Compares the provided plain text password with the hashed password from the database
  • Compares JWT tokens

You can check the correct answer by solving this task in the CodeWorlds game.