"Db.prototype.authenticate method will no longer be available in the next major release..."
I got it since 4.11. Still exists in 4.12.2
Any news about this warning?
For Db.prototype.authenticate method will no longer be available Error try this.
var mongoose = require('mongoose');
mongoose.Promise = global.Promise;
mongoose.connect( "mongodb://username:[email protected]:25146/dbName'", { useMongoClient: true } );
For MongoLab
Make sure you are using the database username and password not the account username and password from Mlab.
In MLab, formerly MongoLab, do the following
Navigate to Users
@add Database User
Choose your username and password
Thanks @UmarEhsan, useMongoClient: true
is the option I was missing.
Most helpful comment
Thanks @UmarEhsan,
useMongoClient: true
is the option I was missing.