powered by
mongo.authenticate(mongo, username, password, db = "admin")
Note that mongo.create() can authenticate a username and password before returning a connected mongo object.
mongo.create()
mongo.add.user
mongo.create
mongo <- mongo.create() if (mongo.is.connected(mongo)) mongo.authenticate(mongo, "Joe", "ZxYaBc217")
Run the code above in your browser using DataLab