Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

    github-oauth2public

    github-oauth2

    Defines a function you can use to fetch an Oauth2 token from github for your application.

    You should set the User-Agent you'd like to use in ./user-agent.js. Otherwise it defaults to: "nodejs/0.0.1 (node) gist command line tool"

    See the github api docs for more info on these parameters

     
    var auth_prep = require("github-oauth2")
      , scopes = ["user", "gist", "repo"]
     
    // currently the module exports a factory function which takes as parameters
    a few details about your application.
    var get_auth = auth_prep("note", "http://note_url.com", scopes)
     
     
    get_auth(function(err, token){
        console.log(token)
    })

    Keywords

    none

    install

    npm i github-oauth2

    Downloadsweekly downloads

    3

    version

    0.1.1

    license

    none

    last publish

    collaborators

    • avatar