Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
heroku-bouncer
Advanced tools
node-heroku-bouncer is an easy-to-use module for adding Heroku OAuth authentication to express apps.
$ npm install heroku-bouncer --save
node-heroku-bouncer assumes you've already added the express cookieParser and cookieSession middlewares to your app. To set it up, pass it your OAuth client ID and secret and another secret used to encrypt your user's OAuth session data.
Use the bouncer.middleware
object to set up middleware that will ensure that
your users are logged in (and redirect otherwise), and the bouncer.routes
object to add the OAuth-specific routes to your app:
var express = require('express');
var app = express();
app.use(express.cookieParser('your cookie secret'));
app.use(express.cookieSession({
secret: 'your session secret',
cookie: {
path : '/'
signed : true,
httpOnly: true,
maxAge : null
}
});
var bouncer = require('heroku-bouncer')({
herokuOAuthID : 'client-id',
herokuOAuthSecret : 'client-secret',
herokuBouncerSecret: 'bouncer-secret'
});
app.use(bouncer.middleware);
app.use(bouncer.router);
app.get('/', function(req, res) {
res.end('you must be logged in!');
});
To log a user out, send them to /auth/heroku/logout
.
$ npm test
FAQs
heroku bouncer middleware for express
The npm package heroku-bouncer receives a total of 1 weekly downloads. As such, heroku-bouncer popularity was classified as not popular.
We found that heroku-bouncer 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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.