diff --git a/src/libs/routes/user.js b/src/libs/routes/user.js index 4239c62bfe461452d915dfceaa7d83e21651389d..05724ab8fe89cefdbac75a4997bf2e13cfc3d887 100644 --- a/src/libs/routes/user.js +++ b/src/libs/routes/user.js @@ -175,7 +175,7 @@ userApp.post('/authenticate', (req, res, next) => { else { user.comparePassword(req.body.password, (err, isMatch) => { if (isMatch && !err) { - var secret = config.get('mongodb:secret'); + var secret = config.mongodb.secret; // if user is found and password is right create a token var token = jwt.encode(user, secret);