gr2m / octokit-oauth-app-now-example

Serverless OAuth API using @octokit/oauth-app & now

Home Page:https://octokit-oauth-app-now-example.now.sh

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

@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

All the default routes are implemented using separate files in the /api folder

Learn more about @octokit/oauth-app.

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://<your app name>.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

now secrets add octokit-oauth-app-client-id <Client ID>
now secrets add octokit-oauth-app-client-secret <Client Secret>

Then create an .env file and put in the Client ID & Secret for your

License

ISC

About

Serverless OAuth API using @octokit/oauth-app & now

https://octokit-oauth-app-now-example.now.sh

License:ISC License


Languages

Language:TypeScript 54.6%Language:JavaScript 30.2%Language:HTML 12.6%Language:CSS 2.5%