0.2.0-debug • Published 3 years ago
@stefanprobst/netlify-cms-oauth-client v0.2.0-debug
netlify-cms-oauth-client
How to install
npm i @stefanprobst/netlify-cms-oauth-clientHow to configure
The following example assumes a website deployed at https://example.com, with the API routes for
the OAuth flow at /api/oauth/authorize and /api/oauth/callback.
(i) Create a new OAuth app on GitHub to get a
"Client ID" and "Client secret". Set the "Authorization callback URL" to
https://example.com/api/oauth/callback.
(ii) Add configuration to NetlifyCMS, and set environment variables.
backend:
name: github
repo: owner/repo
branch: main
base_url: https://example.com
auth_endpoint: /api/oauth/authorizeOAUTH_PROVIDER=github
# GitHub OAuth app client id.
OAUTH_CLIENT_ID=
# GitHub OAuth app client secret.
OAUTH_CLIENT_SECRET=
# GitHub OAuth app callback URL.
OAUTH_REDIRECT_URL=https://example.com/api/oauth/callback
# Deployed website's base URL.
OAUTH_ALLOWED_ORIGIN=https://example.comNote: you can add environment variables to your Vercel deployment via CLI:
vercel env add OAUTH_PROVIDER github0.4.0
2 years ago
0.3.0
2 years ago
0.2.0
3 years ago
0.2.0-debug.2
3 years ago
0.2.0-debug
3 years ago
0.1.3
3 years ago
0.1.2
4 years ago
0.1.1
4 years ago
0.1.0
4 years ago
0.0.1-alpha.2
4 years ago
0.0.1-alpha.1
4 years ago