I use a cloud mongodb server, version is 3.0.7. But its authMechanism is 'MONGODB-CR', not default 'SCRAM-SHA-1'. So when I used 'MONGODB-CR', occured error 'Another user is already authenticated'. My MONGO_URI: 'mongodb://demo:email@example.com:27017/demo?authMechanism=MONGODB-CR'
I read source code, and found the reason,
# flask_pymongo/__init__.py 252-253
authenticate not assign mechanism agument, so 'DEFAULT‘ and occured my error.
The text was updated successfully, but these errors were encountered:
@syfun I know this is a very old bug and it sounds like you've gotten a workaround for this at this point. But I'm trying to revive this project, and I've just recently merged #88, which I think should fix your issue as well. I'll be releasing 0.5.0 soon. When I do, would you be able to test and confirm here whether that works for you?
@dcrosta in 0.5.0, I get this error. not sure if it's related to this issue above:
File "/home/someuser/.local/lib/python3.5/site-packages/flask_pymongo/init.py", line 97, in init
File "/home/someuser/.local/lib/python3.5/site-packages/flask_pymongo/init.py", line 278, in init_app
auth_mechanism = app.config[key('AUTH_MECHANISM')]