
Security News
npm Adopts OIDC for Trusted Publishing in CI/CD Workflows
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
oauth2-server-mongoose
Advanced tools
MongoDB/Mongoose storage backend for oauth2-server
bcrypt
$ npm install --save @compwright/oauth2-server oauth2-server-mongoose mongoose mongoose-bcrypt
const OAuth2Server = require('@compwright/oauth2-server');
const mongooseStore = require('oauth2-server-mongoose');
const oauth = new OAuth2Server({
model: {
...mongooseStore({
// Optional - you can specify your own models for clients and users:
// ClientModel: mongoose.model('OAuthClient'),
// UserModel: mongoose.model('OAuthUser')
})
}
});
See client.model.js and user.model.js for the default model configuration.
Note: if you do supply your own models, be sure to maintain the same plugins, static methods and query helpers.
Interactive script to add a client to the oauthclients
database collection.
Generates and encrypts the client secret automatically.
Interactive script to add a user to the oauthusers
database collection.
Encrypts the user password automatically.
MIT license
FAQs
MongoDB/Mongoose storage backend for oauth2-server
The npm package oauth2-server-mongoose receives a total of 256 weekly downloads. As such, oauth2-server-mongoose popularity was classified as not popular.
We found that oauth2-server-mongoose demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
Research
/Security News
A RubyGems malware campaign used 60 malicious packages posing as automation tools to steal credentials from social media and marketing tool users.
Security News
The CNA Scorecard ranks CVE issuers by data completeness, revealing major gaps in patch info and software identifiers across thousands of vulnerabilities.