|
Since all MongoDB Atlas users authenticate against the admin DB, it behooves us to elaborate on our drivers examples to show connections to a database namespace other than admin but with &authSource=admin at the end.
In other words, replace
"mongodb://kay:myRealPassword@mycluster0-shard-00-00-wpeiv.mongodb.net:27017,mycluster0-shard-00-01-wpeiv.mongodb.net:27017,mycluster0-shard-00-02-wpeiv.mongodb.net:27017/admin?replicaSet=Mycluster0-shard-0&ssl=true"
with
"mongodb://kay:myRealPassword@mycluster0-shard-00-00-wpeiv.mongodb.net:27017,mycluster0-shard-00-01-wpeiv.mongodb.net:27017,mycluster0-shard-00-02-wpeiv.mongodb.net:27017/someDatabase?replicaSet=Mycluster0-shard-0&ssl=true&authSource=admin"
This is important for anyone who uses our driver connection examples but wants to connect to a database other than "admin" – they will need to more than replace the existing "admin" string with their desired database, but instead need to add the authSource=admin param, so we should just always show it
|