UNPKG

github-oauth2

Version:

A utility to get Oauth2 tokens from github for use in api calls.

12 lines (8 loc) 293 B
var auth = require("./index") , scopes = ["user", "gist", "repo"] // currently the module exports a factory function which takes as parameters // a few details about your application. auth('note', 'api.github.com', scopes, function(err, token){ console.log(err) console.log(token) })