Skip to content

docs: update Mongoose examples for promise-based API#1063

Open
Hashim1999164 wants to merge 1 commit into
jaredhanson:masterfrom
Hashim1999164:docs/mongoose7-readme-examples
Open

docs: update Mongoose examples for promise-based API#1063
Hashim1999164 wants to merge 1 commit into
jaredhanson:masterfrom
Hashim1999164:docs/mongoose7-readme-examples

Conversation

@Hashim1999164

@Hashim1999164 Hashim1999164 commented Jul 22, 2026

Copy link
Copy Markdown

Summary

  • Update README LocalStrategy and deserializeUser examples to use async/await with User.findOne / User.findById.
  • Mongoose 7+ no longer accepts callbacks on these methods, so the previous examples fail against current Mongoose.

Fixes #1046

Test plan

  • Confirm README examples no longer pass a callback to findOne / findById
  • Skim the Strategies and Sessions sections for formatting consistency

Mongoose 7 dropped callback support on findOne/findById. Update the
README LocalStrategy and deserializeUser examples to use async/await.

Fixes jaredhanson#1046
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update User.findOne and User.findById parameters in README examples

1 participant