Skip to main content

Module github_oauth

Module github_oauth 

Source
Expand description

GitHub’s OAuth device flow: the two calls that turn a code the user types into a token this machine can store.

Only the transport lives here. What each answer means — which shape is a success, which is “still waiting”, which is a refusal — is decided by the caller, because that decision is the same one the reference makes in its route rather than in a client.

Functions§

client_id
Which app to authorize as. An override that trims away to nothing is not an override, so a variable set to blank behaves as if it were unset.
oauth_base
Where the device flow’s endpoints live: github.com, unless NOMOREIDE_GITHUB_OAUTH_BASE names a loopback address.
request_access_token
Ask whether the user has finished authorizing yet.
request_device_code
Ask GitHub for a device code and the URL to type it into.