0.0.4 • Published 12 years ago

connect_auth_github v0.0.4

Weekly downloads
12
License
-
Repository
-
Last release
12 years ago

connect_auth_github

Like https://github.com/atmos/sinatra_auth_github but for connect.

Warning: The API is not yet complete

Install

npm install connect_auth_github

Usage

var connect = require('connect');

var server = connect.createServer(
    connect.cookieParser(),
    connect.session({ secret: 'keyboard cat' }),
    github({
        appId: "app-id",
        appSecret: "app-secret",
        callback: "http://localhost/auth/github_callback"
      })
);

Authenticate and ensure the user have access to the org 'foo'

var connect = require('connect');

var server = connect.createServer(
    connect.cookieParser(),
    connect.session({ secret: 'keyboard cat' }),
    github.orgAccess({
        appId: "app-id",
        appSecret: "app-secret",
        callback: "http://localhost/auth/github_callback"
      }, 'foo')
);

License

(c) 2012 François de Metz

Mainly inspired by atmos's sinatra_auth_github.

BSD

0.0.4

12 years ago

0.0.3

12 years ago

0.0.2

12 years ago

0.0.1

12 years ago