0

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.
MaddieX
  • 22
  • 3
  • Have you fixed this problem? Facing similar stuff. – Javier Guzmán Nov 04 '20 at 06:52
  • @JavierGuzmán sadly no – MaddieX Nov 04 '20 at 18:47
  • I managed to connect at the end, though it turned out the problem was not saslprep, was just the authentication initial setup. In any case, if you use Webpack like me, this helped to get rid of the error: https://stackoverflow.com/questions/58697934/webpack-how-do-you-require-an-optional-dependency-in-bundle-saslprep – Javier Guzmán Nov 05 '20 at 06:46

0 Answers0