Fixed an issue where not connecting to the database in the async Session callback in authOptions could cause the error "MongooseError: Operation users.findOne() buffering timed out after 10000ms".
This occurs when signing in, closing the browser and re-opening. The session exists but the database is not connected and mongoose throws a time out error.
Fixed an issue where not connecting to the database in the async Session callback in authOptions could cause the error "MongooseError: Operation users.findOne() buffering timed out after 10000ms".
This occurs when signing in, closing the browser and re-opening. The session exists but the database is not connected and mongoose throws a time out error.
See: https://mongoosejs.com/docs/connections.html#buffering