Bcrypt error: illegal arguments String unidentified

后端 未结 8 2059
误落风尘
误落风尘 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:30

    I have tried the same code for authentication once and got the same error Error: Illegal arguments: string, function.

    But I did not see any issue with the code. The thing is, I had registered two users with the same user name and a different password. Then, when I tried to log in with the user name and one password this error occurred and stopped the server.

    So it seems that you are also facing the same problem. Make sure there are no errors with this stuff if you do not want to have a bug in your code.

提交回复
热议问题