I'm using Docker (running on WSL) and I have a MongoDB container running. Using mongo shell
on my host I can connect to the instance, but I can't authenticate. I also get an authentication error when I try to go through MongoDB Compass
, below is the error I keep getting. I've installed saslprep globally via npm on my host machine, but that didn't fix the problem either. Any help would be greatly appreciated!
> db.auth('admin-root', 'test')
Warning: no saslprep library specified. Passwords will not be sanitized
MongoError: Authentication failed.