0.1.0 • Published 11 years ago

idp-github v0.1.0

Weekly downloads
3
License
-
Repository
github
Last release
11 years ago

IDPGithub

Github authentication.

var idpGithub = require('idp-github')({ clientID: '1234', clientSecret: 'secret', 'redirectUri': 'http://example.org' });

// Get the auth URL to redirect the user for OAuth2 login
idpGithub.authUrl({ state: 'session_id' });

// Using the code provided in the query string upon return to your web app, get the identity:
idpGithub(code, function (err, identity) {
  if (err) {
    console.error('explode');
  }
  else {
    do_amazing_things_with(identity.id, identity.name, identity.url, identity.accessToken);
  }
});
0.1.0

11 years ago