-
Type: Bug
-
Resolution: Done
-
Priority: Major - P3
-
None
-
Affects Version/s: 3.1.11
-
Component/s: Authentication
-
None
-
Empty show more show less
When a user has been created in the admin database, it should be possible to authenticate using a URI like: "mongodb://user:password@server".
According to https://docs.mongodb.com/manual/reference/connection-string/:
/database Optional. The name of the database to authenticate if the connection string includes authentication credentials in the form of username:password@. If /database is not specified and the connection string includes credentials, the driver will authenticate to the admin database.
However the current version of the node driver fails with MongoError: Authentication failed with the server logs stating UserNotFound: Could not find user user@undefined
This does with if you add **/?authSource=admin at the end of the URI. C# driver works as expected (I didn't test any others).