Bcrypt error: illegal arguments String unidentified

后端 未结 8 2082
误落风尘
误落风尘 2021-01-17 10:49

here is my complete code

var express = require(\'express\'),
    app = express(),
    mongoose = require(\'mongoose\'),
    bodyParser = require(\'body-parse         


        
8条回答
  •  抹茶落季
    2021-01-17 11:21

    You need to specify that you also want the password because you have set the select property to false on password. So when you are fetching the user, just make sure to explicitly specify that you also want the password. Add .select('+password') on the user object when you are querying a user.

提交回复
热议问题