Uploaded image for project: 'Node.js Driver'
  1. Node.js Driver
  2. NODE-1765

Authentication fails when database is not specified in connection string

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Minor - P4 Minor - P4
    • 3.1.10
    • Affects Version/s: 3.1.8, 3.1.9
    • Component/s: None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      When trying to connect to a database using a connection string where the database is not specified, an Authentication failed (code 18) error is thrown by the MongoClient.connect() method.

      This bug is not present on versions before 3.1.8 and only happens when the new url parser is used.

      When specifying the admin database in the connection string, the error does not occur.

      mongodb://username:password@127.0.0.1:27017  --> does not work
      mongodb://username:password@127.0.0.1:27017/admin --> works
      

            Assignee:
            daniel.aprahamian@mongodb.com Daniel Aprahamian (Inactive)
            Reporter:
            c.quesnel Charles Quesnel
            None
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: