From f991ee46be7208eb75d3f62d231be92c19959966 Mon Sep 17 00:00:00 2001 From: Rafael Conde <rafahari@me.com> Date: Sun, 22 Jan 2017 13:09:20 +0000 Subject: [PATCH 1/2] instructions to auth github --- README.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/README.md b/README.md index 4b06395c..e3352ae7 100644 --- a/README.md +++ b/README.md @@ -139,6 +139,18 @@ Currently these widgets are built-in: * **list** A list of items. Can have an inner `fields` attribute if each element is an object * **hidden** Hidden element - typically only useful with a `default` attribute +### Authorizing GitHub as Provider + +When you're setting up a new CMS configuration you will need to authorize GitHub as your provider. Here's how: + +1. Go to your GitHub Settings page. +2. On the left menu, click “Oauth Applications”. +3. Create a new OAuth application (you can name it anything you want), authorization callback must be: `https://api.netlify.com/auth/done`. +4. Next, you need to go to your app settings on Netlify: + 1. Go to “Access” menu. + 2. On "Authentication Providers”, click “Install Provider”. + 3. Choose “GitHub” and copy the "API Client ID” and "API Secret” that GitHub gave you when you created an Oauth application there. + ## Extending Netlify CMS The Netlify CMS exposes an `window.CMS` global object that you can use to register custom widgets, previews and editor plugins. The available methods are: From 72afa2b85234c527433aff030757ea46e32f9e72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A1ssio=20Souza?= <cassiozen@gmail.com> Date: Tue, 24 Jan 2017 17:25:36 -0200 Subject: [PATCH 2/2] Reformatted auth steps --- README.md | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index e3352ae7..299299db 100644 --- a/README.md +++ b/README.md @@ -96,12 +96,26 @@ Setting up the right collections is the main part of integrating netlify CMS wit ### GitHub as a Backend +When you're setting up a new CMS configuration you will need to authorize GitHub as your provider. The default Github-based authenticator integrates with Netlify's [Authentication Provider feature](https://www.netlify.com/docs/authentication-providers) and the repository backend integrates directly with Github's API. -To get everything hooked up, setup continuous deployment from Github to Netlify -and then follow [the documentation](https://www.netlify.com/docs/authentication-providers) -to setup Github as an authentication provider. + +#### Authorizing GitHub as Provider + +If you already have your site on Netlify with continuous deployment from Github activated, you can setup the authentication with these steps: + +1. Go to your GitHub Settings page. +2. On the left menu, click “Oauth Applications”. +3. Create a new OAuth application (you can name it anything you want), authorization callback must be: `https://api.netlify.com/auth/done`. +4. Next, you need to go to your app settings on Netlify: + 1. Go to “Access” menu. + 2. On "Authentication Providers”, click “Install Provider”. + 3. Choose “GitHub” and copy the "API Client ID” and "API Secret” that GitHub gave you when you created an Oauth application there. + +For detailed information on how to get everything hooked up, follow [the documentation](https://www.netlify.com/docs/authentication-providers). + + That's it, now you should be able to go to the `/admin` section of your site and log in. @@ -139,17 +153,6 @@ Currently these widgets are built-in: * **list** A list of items. Can have an inner `fields` attribute if each element is an object * **hidden** Hidden element - typically only useful with a `default` attribute -### Authorizing GitHub as Provider - -When you're setting up a new CMS configuration you will need to authorize GitHub as your provider. Here's how: - -1. Go to your GitHub Settings page. -2. On the left menu, click “Oauth Applications”. -3. Create a new OAuth application (you can name it anything you want), authorization callback must be: `https://api.netlify.com/auth/done`. -4. Next, you need to go to your app settings on Netlify: - 1. Go to “Access” menu. - 2. On "Authentication Providers”, click “Install Provider”. - 3. Choose “GitHub” and copy the "API Client ID” and "API Secret” that GitHub gave you when you created an Oauth application there. ## Extending Netlify CMS