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, unlessNOMOREIDE_GITHUB_OAUTH_BASEnames 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.