Mongoose connection authentication failed
I have the same problem, and it solved by removing the 'authSource' param
/* Not working */mongoose.connect("mongodb://localhost:27017/test", { "auth": { "authSource": "admin" }, "user": "admin", "pass": "admin123", "useMongoClient": true});/* Working */mongoose.connect("mongodb://localhost:27017/test", { "user": "admin", "pass": "admin123", "useMongoClient": true});
Tested on Mongoose-v5.0.0.