I want to implement Authentication on MongoDB before accessing the database. Like in MYSQL, we have to create the username and password for specific database in PHP.
Now I want to implement the same protocols on MongoDB. I want to know how we can create the username and password for MongoDB Database so that when a request is generated from my node server then I have to pass the credential, without credential it has to generate the error. Any tutorial suggestion is really appreciated or someone has a better idea to share the things. I want only that my database is responded to only genuine or trusted server no other.