Skip to content

Commit

Permalink
chore: update ghauth to support device flow
Browse files Browse the repository at this point in the history
Also not to stop using basic auth unless you are using GHE.
  • Loading branch information
bcomnes committed Sep 13, 2020
1 parent 6ea5b63 commit 725b859
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,15 +115,16 @@ var options = {
var options = {}

// auth is required
// it can either be a username & password...
// it can be an API token...
options.auth = {
username: 'ungoldman',
password: 'XXXXXXXX'
token: 'XXXXXXXX'
}

// or an API token
// or it can either be a username & password
// (But only for GitHub Enterprise when endpoint is set)
options.auth = {
token: 'XXXXXXXX'
username: 'ungoldman',
password: 'XXXXXXXX'
}

ghRelease(options, function (err, result) {
Expand Down
1 change: 1 addition & 0 deletions bin/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ var isEnterprise = !!argv.endpoint && argv.endpoint !== 'https://api.github.com'
// get auth

var ghauthOpts = {
clientId: '04dac3c40b7e49b11f38',
configName: 'gh-release',
scopes: ['repo'],
note: 'gh-release',
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"deep-extend": "^0.6.0",
"gauge": "^3.0.0",
"gh-release-assets": "^1.1.0",
"ghauth": "^4.0.0",
"ghauth": "bcomnes/ghauth#oauth-device-flow",
"github-url-to-object": "^4.0.4",
"inquirer": "^7.3.3",
"request": "^2.82.0",
Expand Down

0 comments on commit 725b859

Please sign in to comment.