Skip to content

bullwinkle-org/netlify-cms-oauth

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Netlify CMS on Vercel

A simple OAuth2 serverless gateway for Netlify CMS written in TypeScript.

Why do I need this?

If you would like to use Netlify CMS to manage your site deployed to Vercel.

GitHub and Gitlab requires a server for authentication and Netlify provides this server only for sites deployed to it. Fortunately, such server is rather small and can work with Vercel's serverless functions.

Usage

In yours projects modify config.yml file:

backend:
  name: [github | gitlab]
  repo: adrian-ub/adrian-ub # Path to your Github/Gitlab repository
  branch: main # Branch to update
  base_url: https://netlify-cms.adrianub.vercel.app

Deploy

  • Create a OAuth App on Github and Gitlab

  • Set Authorization callback URL url of your oauth website deployed

  • Set environment variables on Vercel

    OAUTH_GITHUB_CLIENT_ID=<you-client-id>
    OAUTH_GITHUB_CLIENT_SECRET=<you-client-secret>
    
    OAUTH_GITLAB_CLIENT_ID=<you-client-id>
    OAUTH_GITLAB_CLIENT_SECRET=<you-client-secret>

Authors

About

Use Netlify CMS for sites hosted on Vercel.

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • HTML 97.7%
  • TypeScript 2.3%