cli/internal/config
Mislav Marohnić 60eebd2896 Implement OAuth Device Authorization flow
Before, we implemented the OAuth app authorization flow which requires a
callback URL. To provide such a URL, we had to spin up a local HTTP
server, which was brittle and did not cover cases where a person might
want to authenticate with a browser that runs on a different machine
than the GitHub CLI process.

This implements the OAuth Device Authorization flow where the user is
given a one-time code and asked to paste it in the browser flow. There
is no callback URL, so we can avoid spinning up a local server, and the
user may open a browser on any of their devices, as long as they provide
the correct one-time code.

If the Device Authorization flow is detected to be unavailable for the
OAuth app (right now, it's specifically enabled for GitHub CLI) or for
an older GitHub Enterprise instance, this falls back to the old app
authentication flow.
2020-08-13 19:21:08 +02:00
..
alias_config.go better get func 2020-06-05 13:09:04 -05:00
config_file.go Isolate all alias commands 2020-08-11 13:57:48 +02:00
config_file_test.go Support hosts.yml existing while config.yml does not 2020-07-01 14:34:44 +02:00
config_setup.go Implement OAuth Device Authorization flow 2020-08-13 19:21:08 +02:00
config_success.go move config stuff to its own package 2020-04-20 13:57:16 -05:00
config_type.go Merge branch 'pr-commands-isolate-3' into issue-commands-isolate 2020-08-11 15:40:05 +02:00
config_type_test.go test default configuration 2020-06-11 14:04:41 -05:00
testing.go Support hosts.yml existing while config.yml does not 2020-07-01 14:34:44 +02:00