Authentication in mongoose using SCRAM-SHA-1

不好使:
mongoose.connect(‘mongodb://user:password@host:port/dbname?authSource=dbWithUserCredentials’)

好使:
config.mgOptions = {

user: 'root',
pass: 'root',
auth: 'SCRAM-SHA-1',
server: {poolSize: 50},
connectTimeoutMS: 20000

};

config.connString = ‘mongodb://ip:port/database’;