pksunkara / octonode

github api v3 in nodejs
MIT License
1.19k stars 237 forks source link

[ISSUE #297] return headers in login callback for authentication #299

Closed thatkookooguy closed 6 years ago

thatkookooguy commented 6 years ago

resolves #297

Let me know if you want me to do something similar in the web login flow

basically, changed the login function to this:

var scopes = {
  'add_scopes': ['user', 'repo', 'gist'],
  'note': 'admin script'
};

github.auth.config({
  username: 'pksunkara',
  password: 'password'
}).login(scopes, function (err, id, token, headers) {
  console.log(id, token);
});
pksunkara commented 6 years ago

Yeah, please add it to the other flow too. Thanks.