github-web-application-flow
Implementation for GitHub OAuth Web Application Flow
What's this?
This is an implementation for GitHub Authorizing OAuth Apps by Web Application Flow. This package is intended to use in CLI for users to authenticate GitHub OAuth Apps. You can get Access Tokens from GitHub with scopes you requested.
How to install
-
Create a new GitHub OAuth App (see this instruction).
-
Copy your Client ID & Client Secret from the App's setting (see Developer applications).
-
Install from npm.
npm i -S github-web-application-flow -
Setup scripts (see full examples in
examples/
dir).const webAppFlow =const accessToken = awaitconsole
Configuration
/** * WebAppFlowOptions is used to initialize the main func: webAppFlow(). */
Troubleshooting
What about GitHub Enterprise?
You can use your own domain for GitHub Enterprise by the baseUrl
option.
const accessToken = await
Can I access to the Internet with proxies?
You can use the httpsAgent
option for this. Set agents for this such as socks-proxy-agent, https-proxy-agent, etc.
const SocksProxyAgent = const accessToken = await
others?
Issue at GitHub repo.
LICENSE
MIT License
Authors
- JINNOUCHI Yasushi <me@delphinus.dev>