Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Netlify CMS, Gatsby and GitHub authentication without Netlify

Did anyone has luck using OAUTH to authenticate to GB from Netlify CMS but NOT using the Netlify API? If so, what did you use? I want do the authentication with my domain but Im not sure which API or package Should I use for this. Im learning. Any help will be appreciated.

like image 543
Peter Avatar asked Apr 17 '18 00:04

Peter


People also ask

How does Netlify CMS authenticate with GitHub?

So for Netlify CMS to authenticate with GitHub it uses OAuth2 - and the particular version of authentication it uses demands a server-side element to complete the authentication.

How do I set up Gatsby with Netlify?

The Gatsby starter initializes Git automatically for you, so you only need to do: Go to Netlify and select 'New Site from Git'. Select GitHub and the repository you just pushed to. Click Configure Netlify on GitHub and give access to your repository.

How do I use Git gateway without Netlify?

You can use Git Gateway without Netlify by setting up your own Git Gateway server and connecting it with your own instance of GoTrue (the open source microservice that powers Netlify Identity), or with any other identity service that can issue JSON Web Tokens (JWT).

What is the Netlify identity service?

(For Bitbucket repositories, use the Bitbucket backend instead.) The Netlify Identity service can handle the authentication and provides a simple interface for user management.


1 Answers

Yes, the external OAuth clients are listed under https://www.netlifycms.org/docs/authentication-backends/#github-backend. Currently, there are clients in Node.JS, Python, and Go:

  • https://github.com/vencax/netlify-cms-github-oauth-provider
  • https://github.com/davidejones/netlify-cms-oauth-provider-python
  • https://github.com/igk1972/netlify-cms-oauth-provider-go

Once you set up the server, you can simply add a base_url setting point to your OAuth client under your backend in your CMS config:

backend:
  name: github
  repo: user/repo
  base_url: https://your.server.com # URL to OAuth client
like image 134
tech4him Avatar answered Sep 28 '22 08:09

tech4him