Django - Mongo Authentication fail

Hi Guys,

I am facing Authentication failure issue while trying to migrate models to mongodb , Double checked username and password (able to connect mongo using MongoExpress using same credentials).

Following is the Database settings which I used .

DATABASES = {
        'default': {
            'ENGINE': 'djongo',
            'NAME': 'your-db-name',
            'ENFORCE_SCHEMA': False,
            'CLIENT': {
                'host': 'localhost',
                'port': 27017,
                'username': 'admin',
                'password': 'password',
            },
            'LOGGING': {
                'version': 1,
                'loggers': {
                    'djongo': {
                        'level': 'DEBUG',
                        'propagate': False,                        
                    }
                },
             },
        }
    }

Error :

raise OperationFailure(errmsg, code, response, max_wire_version)
pymongo.errors.OperationFailure: Authentication failed., full error: {'ok': 0.0, 'errmsg': 'Authentication failed.', 'code': 18, 'codeName': 'AuthenticationFailed'}

Since Djongo is a third-party package and not part of Django, you might get more direct and specific help in a Djongo-related area.

See GitHub - nesdis/djongo: Django and MongoDB database connector for some areas you can check.

(There might be some Djongo-knowledgeable people around here who would be happy to help, but your chances of getting assistance may be better in one of those other locations.)