MongoDB Atlas connection error in MERN

``
(node:20552) [MONGODB DRIVER] Warning: useNewUrlParser is a deprecated option: useNewUrlParser has no effect since Node.js Driver version 4.0.0 and will be removed in the next major version
(Use node --trace-warnings ... to show where the warning was created)
(node:20552) [MONGODB DRIVER] Warning: useUnifiedTopology is a deprecated option: useUnifiedTopology has no effect since Node.js Driver version 4.0.0 and will be removed in the next major version
Server is running
Error connecting to MongoDB Atlas: MongoServerError: bad auth : authentication failed
at Connection.onMessage (D:\Software Engineering\Projects\Semester 5 - ADSE-I\Mern through Youtube\Login Register\Mern_Test\server\node_modules\mongoose\node_modules\mongodb\lib\cmap\connection.js:205:26)
at MessageStream. (D:\Software Engineering\Projects\Semester 5 - ADSE-I\Mern through Youtube\Login Register\Mern_Test\server\node_modules\mongoose\node_modules\mongodb\lib\cmap\connection.js:64:60)
at MessageStream.emit (node:events:518:28)
at processIncomingData (D:\Software Engineering\Projects\Semester 5 - ADSE-I\Mern through Youtube\Login Register\Mern_Test\server\node_modules\mongoose\node_modules\mongodb\lib\cmap\message_stream.js:117:16)
at MessageStream._write (D:\Software Engineering\Projects\Semester 5 - ADSE-I\Mern through Youtube\Login Register\Mern_Test\server\node_modules\mongoose\node_modules\mongodb\lib\cmap\message_stream.js:33:9)
at writeOrBuffer (node:internal/streams/writable:564:12)
at _write (node:internal/streams/writable:493:10)
at Writable.write (node:internal/streams/writable:502:10)
at TLSSocket.ondata (node:internal/streams/readable:1007:22)
at TLSSocket.emit (node:events:518:28) {
ok: 0,
code: 8000,
codeName: ‘AtlasError’,
connectionGeneration: 0,
[Symbol(errorLabels)]: Set(2) { ‘HandshakeError’, ‘ResetPool’ }
}
`````

bad auth : authentication failed means wrong user id or password
Check if you are using the correct id and password and check for any spaces in your connect string
Can you connect with shell?