
Security News
Free Certified Patch for Critical Rails Active Storage Vulnerability
Socket has released a free Certified Patch for a critical Rails Active Storage vulnerability, giving developers time to upgrade to a secure Rails version.
@npmcorp/oauth2-server
Advanced tools
Complete, framework-agnostic, compliant and well tested module for implementing an OAuth2 Server in node.js
Complete, compliant and well tested module for implementing an OAuth2 server in node.js.
The node-oauth2-server module is framework-agnostic but there are several wrappers available for popular frameworks such as express and koa.
Using the express wrapper (recommended):
var express = require('express');
var oauthserver = require('express-oauth-server');
var app = express();
var oauth = new oauthServer({ model: model });
app.use(oauth.authenticate());
app.get('/', function (req, res) {
res.send('Hello World');
})
app.listen(3000);
Using this module directly (for custom servers only):
var Request = require('oauth2-server').Request;
var oauthServer = require('oauth2-server');
var oauth = new oauthServer({ model: model });
var request = new Request({
headers: { authorization: 'Bearer foobar' }
});
oauth.authenticate(request)
.then(function(data) {
// Request is authorized.
})
.catch(function(e) {
// Request is not authorized.
});
Note: see the documentation for the specification of what's required from the model.
authorization_code (with scopes), client_credentials, password, refresh_token and custom extension grant types.Most users should refer to our express or koa examples. If you're implementing a custom server, we have many examples available:
This module has been rewritten with a promise-based approach and introduced a few changes in the model specification.
Please refer to our 3.0 migration guide for more information.
FAQs
Complete, framework-agnostic, compliant and well tested module for implementing an OAuth2 Server in node.js
The npm package @npmcorp/oauth2-server receives a total of 5 weekly downloads. As such, @npmcorp/oauth2-server popularity was classified as not popular.
We found that @npmcorp/oauth2-server 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.

Security News
Socket has released a free Certified Patch for a critical Rails Active Storage vulnerability, giving developers time to upgrade to a secure Rails version.

Security News
/Threat Research
A malicious Ruby gem runs a credential-stealing worm during installation, poisons AI coding tools, and can wipe files when a stolen GitHub token is revoked.

Security News
GitHub is tightening GitHub Actions security with new restrictions on privileged pull request workflows. Here's what changes and how maintainers are affected.