This is a simple app that makes it possible to authenticate Netlify CMS against GitHub. It runs on the Vercel serverless infrastructure.
Your probably want to clone the repo and deploy it to your Vercel account. No code changes are needed, the configuration is done through environment variables (see Vercel docs).
Variable | Default | Comments |
---|---|---|
OAUTH_CLIENT_ID |
— | GitHub app ID, see your GitHub settings page. |
OAUTH_CLIENT_SECRET |
— | GitHub app secret |
REDIRECT_URL |
— | The public URL this app is deployed at + /callback . Has to match the “Callback URL” setting of your GitHub app. |
OAUTH_SCOPES |
repo,user |
See GitHub docs for possible values. |
GIT_HOSTNAME |
https://github.com |
|
OAUTH_TOKEN_PATH |
/login/oauth/access_token |
|
OAUTH_AUTHORIZE_PATH |
/login/oauth/authorize |
The code is based on marksteele/netlify-serverless-oauth2-backend.