https://github.com/gr2m/octokit-oauth-app-now-example
Serverless OAuth API using @octokit/oauth-app & now
https://github.com/gr2m/octokit-oauth-app-now-example
Last synced: about 1 year ago
JSON representation
Serverless OAuth API using @octokit/oauth-app & now
- Host: GitHub
- URL: https://github.com/gr2m/octokit-oauth-app-now-example
- Owner: gr2m
- License: isc
- Created: 2020-02-26T05:16:14.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-07-12T04:32:19.000Z (almost 3 years ago)
- Last Synced: 2025-06-05T07:04:37.065Z (about 1 year ago)
- Language: TypeScript
- Homepage: https://octokit-oauth-app-now-example.now.sh
- Size: 42 KB
- Stars: 10
- Watchers: 2
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# `@octokit/oauth-app` serverless example
This example showcases how to create an OAuth Client server for GitHub's (OAuth) Apps for a serverless environment using [now](https://zeit.co/home)
All the [default routes](https://github.com/octokit/oauth-app.js#middlewares) are implemented using separate files in the `/api` folder
Learn more about [`@octokit/oauth-app`](https://github.com/octokit/oauth-app.js#readme).
## Setup
Create two OAuth GitHub Apps, one for production and one for local development:
https://github.com/settings/applications/new
The one for production needs to set `Authorization callback URL` to your apps URL: `https://.now.sh`. Then one for local development needs to set it to `http://localhost:3000`
Set the `octokit-oauth-app-client-id` and `octokit-oauth-app-client-secret` secrets using the `now` CLI
```sh
now secrets add octokit-oauth-app-client-id
now secrets add octokit-oauth-app-client-secret
```
Then create an `.env` file and put in the Client ID & Secret for your
## License
[ISC](LICENSE)