• support[@]kurinchilion.com
  • +1 (888) 666-4252

MongoError: authentication fail – when connecting from NodeJS

Oct 19, 2021 - by kurinchilamp / Mongo / Post Comment
Check the connection string that is used for authenticating with MongoDB server. When trying to connect with MongoDB Compass connection may be working and it might fail when connecting via NodeJS code. Check if authSource parameter and the ssl param are properly set. Sample MongoDB URI that works on NodeJS connection setup is shown below: MONGO_URI=mongodb://USER:Password@localhost:27017/SampleDatabase?authSource=admin&readPreference=primary&directConnection=true&ssl=false
Continue Reading

TECHNOLOGY DEV STACK

Following are some of the technologies that we use to build and maintain solutions for our clients.