Closed claysquareninety closed 6 years ago
A software architectural note: I'd use docker containers and something like docker-compose to link them together so it wouldn't be necessary to set up auth.
MongoDB user/pass can be easily configured just via adding them to config files. For security purposes, it will be super awesome to have MongoDB connection secured, not only with user/pass but with an SSL also. But probably, it's a bit out of the scope of ooth.
I'm working on a working example right now. I really don't believe it should be a problem.
I added a minimal-mongo-auth example that works for me. Probably your problem was that when creating a mongodb connection the URL already needs to contain the database name (i.e. MongoClient.connect('mongodb://localhost:27017/ooth-minimal-auth')
instead of MongoClient.connect('mongodb://localhost:27017')
) - at least that's what did the trick for me.
Thank you for your contributions.
@nmaro I will give that a shot, but pretty sure I had tried it. Thanks for the help!
Instructions from https://medium.com/@matteocontrini/how-to-setup-auth-in-mongodb-3-0-properly-86b60aeef7e8 followed.