Tell us what’s happening:
Describe your issue in detail here.
This is the error message Im getting:
MongoError: (Unauthorized) not authorized on admin to execute command { insert: “people”, documents: [[{favoriteFoods [cars more cars very rare cars]} {_id ObjectID(“62b337f330249f006ee57835”)} {name Jay Leno} {age 80} {__v 0}]], ordered: true, writeConcern: { w: “majority” }, lsid: { id: {4 [165 119 51 212 57 115 69 189 156 37 110 73 200 128 121 98]} }, txnNumber: 2.000000, $clusterTime: { clusterTime: {1655912434 14}, signature: { hash: {0 [41 21 86 69 1 137 23 49 48 1 106 237 150 81 217 140 76 133 224 12]}, keyId: 7057979277173587968.000000 } }, $db: “admin” }
I understand it telling me im not authorized but Im not really sure why Im not authorized. My passwords match in the env file and database so Im not really sure what else could do to be authorized atm. Any help would be greatly appreciated.
Your project link(s)
solution: boilerplate-mongomongoose - Replit
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.67 Safari/537.36
Challenge: Create and Save a Record of a Model
Link to the challenge: