node_modules/mongoose/node_modules/mongodb/lib/cmap/auth/mongo_credentials.js
/**
     * If the authentication mechanism is set to "default", resolves the authMechanism
     * based on the server version and server supported sasl mechanisms.
     *
     * @param hello - A hello response from the server
     */
If the authentication mechanism is set to "default", resolves the authMechanism
based on the server version and server supported sasl mechanisms.

@param hello - A hello response from the server
If the authentication mechanism is set to " default " resolves the authMechanism based on the server version and server supported sasl mechanisms . @param hello - A hello response from the server
resolveAuthMechanism(hello) {
        if (this.mechanism.match(/DEFAULT/i)) {
            return new MongoCredentials({
                username: this.username,
                password: this.password,
                source: this.source,
                mechanism: getDefaultAuthMechanism(hello),
                mechanismProperties: this.mechanismProperties
            });
        }
        return this;
    }
resolveAuthMechanism ( hello ) { if ( this . mechanism . match ( / DEFAULT / i ) ) { return new MongoCredentials ( { username : this . username , password : this . password , source : this . source , mechanism : getDefaultAuthMechanism ( hello ) , mechanismProperties : this . mechanismProperties } ) ; } return this ; }
If the authentication mechanism is set to "default", resolves the authMechanism
 based on the server version and server supported sasl mechanisms.
If the authentication mechanism is set to " default " resolves the authMechanism based on the server version and server supported sasl mechanisms .
// If the mechanism is not "default", then it does not need to be resolved