-
Type:
Bug
-
Resolution: Done
-
Priority:
Critical - P2
-
None
-
Affects Version/s: 3.0.0
-
Component/s: MongoDB 3.2
Mongoose (NodeJS Mongo Driver) Authentication with Mongo DB 3 is failing with SHA-1 SCRAM credentials. I am passing username/password/authDB/etc., but it is not allowing me to connect and giving the following error: MongoError: Authentication failed.
I am using the following lines to connect:
var mongoose = require('mongoose');
var db = mongoose.connect("mongodb://username:password@host:port/dbName?authSource=authDB&authMechanism=SCRAM-SHA-1",
function (err, res) {
if (err)
else
{ console.log ('Success'); }});
Every time, it falls into the error condition.