mongodb successfully connects the my local server in development after i changed the cluster’s password but on vercel I keep getting this error:
⨯ MongoServerError: bad auth : authentication failed
errorResponse: {
ok: 0,
errmsg: ‘bad auth : authentication failed’,
code: 8000,
codeName: ‘AtlasError’
},
This error means your cluster’s password is incorrect, so double check you’ve set it in the correct places on the Vercel dashboard.
If it’s part of your connection string in an environment variable, make sure that variable is exposed to the correct environment (Production, Preview, Development like the below screenshot)