Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

auth-routes

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

auth-routes

Helpful authentication routes for Node.js GitHub integrations

  • 0.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
5
decreased by-44.44%
Maintainers
1
Weekly downloads
 
Created
Source

GitHub Auth Routes

Helpful authentication routes for Node.js GitHub integrations

NPM Build Status Codecov

Usage

const { registerAuthRoutes } = require('auth-routes')

const app = express()
registerAuthRoutes(app, {
  client_id: process.env.GITHUB_CLIENT_ID,
  client_secret: process.env.GITHUB_CLIENT_SECRET
})

// Or pass some options:
registerAuthRoutes(app, {
  loginURL: '/log-me-in',
  callbackURL: '/call-me-back',
  client_id: process.env.GITHUB_CLIENT_ID,
  client_secret: process.env.GITHUB_CLIENT_SECRET
})

Use with Probot

module.exports = app => {
  // Access the Express server that Probot uses
  const expressApp = app.route()

  // Register the routes as normal
  registerAuthRoutes(expressApp, {
    client_id: process.env.GITHUB_CLIENT_ID,
    client_secret: process.env.GITHUB_CLIENT_SECRET
  })
}

Options

NameDescriptionRequiredDefault
client_idGitHub App's Client ID-
client_secretGitHub App's Client Secret-
loginURLLogin path'/login'
callbackURLAuthorization callback URL, for your GitHub App'/login/cb'
afterLoginWhere users are redirected to after they've logged in'/'

Keywords

FAQs

Package last updated on 13 Dec 2018

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc