Skip to content

Commit

Permalink
minor tweak to more easily allow requesting permission scopes. These …
Browse files Browse the repository at this point in the history
…aren't generally required for authentication but if you want to reuse the authentication with something else (like a web UI to your GitHub deploy system) you might want to throw a few more scopes in in one go.
  • Loading branch information
mattbornski committed Mar 13, 2012
1 parent 90be9d9 commit b6a5094
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/passport-github/strategy.js
Expand Up @@ -20,6 +20,9 @@ var util = require('util')
* - `clientID` your GitHub application's Client ID
* - `clientSecret` your GitHub application's Client Secret
* - `callbackURL` URL to which GitHub will redirect the user after granting authorization
* - `scope` array of permission scopes to request. valid scopes include:
* 'user', 'public_repo', 'repo', 'gist', or none.
* (see http://developer.github.com/v3/oauth/#scopes for more info)
*
* Examples:
*
Expand All @@ -43,6 +46,7 @@ function Strategy(options, verify) {
options = options || {};
options.authorizationURL = options.authorizationURL || 'https://github.com/login/oauth/authorize';
options.tokenURL = options.tokenURL || 'https://github.com/login/oauth/access_token';
options.scopeSeparator = ',';

OAuth2Strategy.call(this, options, verify);
this.name = 'github';
Expand Down

0 comments on commit b6a5094

Please sign in to comment.