Code Monkey home page Code Monkey logo

github-oauth-service's Introduction

Deploy with Vercel

Netlify CMS on Vercel

A simple OAuth2 serverless gateway for Netlify CMS


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 Github OAuth App:

    • Go to developer settings
    • Set Authorization callback URL to your deployed oauth website's callback URL: https://netlify-cms.adrianub.vercel.app/callback
  • Create Gitlab OAuth app:

    • Go to User settings > Applications
    • Set Redirect URI to your deployed oauth website's callback URL: https://netlify-cms.adrianub.vercel.app/callback
  • 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

github-oauth-service's People

Contributors

adrian-ub avatar greenheart avatar hektor avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.