Connect database mongodb forum

Hello everyone,

I have created a user to connect to the MongoDB database of the forum using the command:

use FORUM_MONGODB_DATABASE
db.createUser({
  user: "MONGODB_USERNAME",
  pwd: "MONGODB_PASSWORD",
  roles: ["dbAdmin", "readWrite"],
  passwordDigestor: "server"
})

However, when I try to access the Discuss page, I encounter an error

Mongo::Error::OperationFailure: [13:Unauthorized]: command find requires authentication (on 3.1.196.228:27017, modern retry, attempt 1)>

Can anyone help me understand why this is happening?