What is the improvement or update you wish to see?
Change all instances of client to client.connect() in the MongoDBAdapter example.
Is there any context that might help us understand?
The parameter type for MongoDBAdapter() is Promise<MongoClient> | (() => Promise<MongoClient>). However, the documentation currently passes client which is of type MongoClient. This can be fixed by calling the .connect() function on the client object which returns a Promise<MongoClient> type.
Does the docs page already exist? Please link to it.
What is the improvement or update you wish to see?
Change all instances of
client
toclient.connect()
in the MongoDBAdapter example.Is there any context that might help us understand?
The parameter type for
MongoDBAdapter()
isPromise<MongoClient> | (() => Promise<MongoClient>)
. However, the documentation currently passesclient
which is of typeMongoClient
. This can be fixed by calling the.connect()
function on theclient
object which returns aPromise<MongoClient>
type.Does the docs page already exist? Please link to it.
https://authjs.dev/getting-started/adapters/mongodb