These guides show you how to authenticate to a MongoDB instance using the Node.js driver.
The Authentication Mechanisms guide contains sample connection code using each authentication mechanism supported in the MongoDB Community Edition which includes:
The Enterprise Authentication Mechanisms guide contains sample connection code using authentication mechanisms available only in MongoDB Enterprise Edition which includes:
For instructions on MongoDB driver installation and deployment setup, see our Connect to MongoDB guide. Select your MongoDB deployment type and the Node.js client.