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

No AuthProvider for DEFAULT defined when authSource is defined but credentials are missing

    • Type: Icon: Bug Bug
    • Resolution: Unresolved
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: 4.0.0
    • Component/s: Error
    • None

      What problem are you facing?

      The driver errors with: "No AuthProvider for DEFAULT defined" when `authSource` is defined but credentials are missing.

      The previous version of the driver and the legacy shell just used to connect without authenticating any user if the server allows it.

      I'm opening this as a Bug ticket although i'm not sure if this is intentional or not. In case we keep this change would it be possible to have a better error message so that users will be able to fix the issue themselves?

      What driver and relevant dependency versions are you using?

      "4.0.0-beta.6"

      Steps to reproduce?

      Connect to with any connection string with an authSource param and no credentials: for example: mongodb://localhost:27020?authSource=admin

            Assignee:
            Unassigned Unassigned
            Reporter:
            maurizio.casimirri@mongodb.com Maurizio Casimirri
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: