MongoDB/Mongoose storage backend for the oauth2-server library. Stable v1.3.3, low release cadence. Integrates with oauth2-server to store OAuth clients and users in MongoDB using Mongoose models. Uses the mongoose-bcrypt plugin to encrypt client secrets and user passwords. Differentiators: minimal configuration, bundled CLI scripts for creating clients and users. Requires Node >=10, mongoose >=5, and mongoose-bcrypt >=1.5 as peer dependencies.
npm install oauth2-server-mongooseNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to initialize OAuth2Server with mongooseStore and perform password grant.
Install all peer deps: npm install mongoose mongoose-bcrypt
Use Mongoose 5, or check compatibility with mongoose-bcrypt latest version
Ensure custom models include the mongoose-bcrypt plugin and implement required methods like authenticateUser.
Call mongoose.connect() before initializing oauth2-server-mongoose.
Ensure you spread mongooseStore() into the model property: model: { ...mongooseStore() }Include mongoose-bcrypt plugin in your client model schema.
Verify mongoose.connect() is called before any model operations.
Use `const mongooseStore = require('oauth2-server-mongoose');` (no .default) or import correctly.