When establishing security for database users, you have a choice of several different approaches. One of the most popular approaches is challenge-response. Simply put: the database challenges the user to prove their identity. The response (in most cases), is a username and password combination. In MongoDB 3, this popular approach was implemented by default using MONGODB-CR (MongoDB Challenge Response). As of MongoDB 4, this mechanism is no longer available. This means that when you upgrade from MongoDB 3 to MongoDB 4, you must implement at least its replacement, Salted Challenge Response Authentication Method (SCRAM).
If your user credentials are in MONGODB-CR format, then you must use the following command to upgrade to SCRAM format:
db.adminCommand({authSchemaUpgrade: 1});
It is critical that you perform this upgrade while still running MongoDB 3....