Open aleksre opened 3 years ago
Try to shorten username and pass global admin priviledges to that user. Both of these helped me to get connection.
The connection string approach worked for me, I don't see anything wrong with yours. I couldn't get the full object version to work, not sure why.
Adding authMechanism=SCRAM-SHA-1 to the connection string worked for me...
After upgrading to latest version from v.0.13.0, I am no longer able to connect to the cluster.
I know the auth is correct because it works with compass from the same computer, and of course the same user/password worked just fine with the old version. Nothing has changed in atlas and my IP is whitelisted.
Code:
I have also tried with:
await client.connect(`mongodb+srv://${dbuser}:${dbpass}@cluster0.skgsx.mongodb.net/${dbname}?retryWrites=true&w=majority&authMechanism=SCRAM-SHA-1`)