'Bad Auth with mongoose when deploying NestJS app on Heroku
I'm trying to deploy my NestJS app on Heroku but now all of the sudden app is throwing Bad Auth error.
On the development it's all working fine.
This is the error I'm getting:
I'm storing the credentials in .env
Are these constants populated by Heroku with some unexpected values?
And I'm allowing the connection from every IP address:

What is going on and how to fix this?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|


