mongolab / mongoctl

Manage MongoDB servers and replica sets using JSON configurations!
MIT License
178 stars 25 forks source link

Mongo URI AuthSource Not Supported with Connect #30

Open duane-talentsonar opened 8 years ago

duane-talentsonar commented 8 years ago

It appears that a mongo URI that uses the authSource option cannot properly connect to the database.

Given a URI of the form: mongodb://user:pass@server-1:27017,server-2:27017/database?replicaSet=rs-1&ssl=true&authSource=admin

The response is

Locating default server for cluster 'mongodb://*****:*****@server-1:27017,server-2:27017/database'...
Connecting to server 'server-1:27017'
Invalid login!
Enter username for database 'database': 

The authSource to the admin database appears to be lost during the URI parsing and connection process.