
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
github-oauth
Advanced tools
simple functions for doing oauth login with github. compatible with any node http server that uses handler callbacks that look like function(req, res) {}
var githubOAuth = require('github-oauth')({
githubClient: process.env['GITHUB_CLIENT'],
githubSecret: process.env['GITHUB_SECRET'],
baseURL: 'http://localhost',
loginURI: '/login',
callbackURI: '/callback',
scope: 'user' // optional, default scope is set to user
})
require('http').createServer(function(req, res) {
if (req.url.match(/login/)) return githubOAuth.login(req, res)
if (req.url.match(/callback/)) return githubOAuth.callback(req, res)
}).listen(80)
githubOAuth.on('error', function(err) {
console.error('there was a login error', err)
})
githubOAuth.on('token', function(token, serverResponse) {
console.log('here is your shiny new github oauth token', token)
serverResponse.end(JSON.stringify(token))
})
// now go to http://localhost/login
If you want to support no scope, pass in scope: ''
githubOauth.addRoutes(myAppRouter)
// where myAppRouter is a router that will work with:
// myAppRouter.get('/github/login', function(req, res) {})
// http://github.com/flatiron/director works like this
// or even more bonus:
githubOauth.addRoutes(myAppRouter, function(err, token, serverResponse, tokenResponse) {
})
BSD LICENSED
FAQs
simple functions for doing oauth login with github
The npm package github-oauth receives a total of 38 weekly downloads. As such, github-oauth popularity was classified as not popular.
We found that github-oauth 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.