Add Oauth and Graphql sections

This commit is contained in:
Bertocq
2017-09-13 14:01:51 +02:00
parent ca7113859a
commit ff65eaac2a
6 changed files with 81 additions and 0 deletions

View File

@@ -24,6 +24,16 @@
* [Overwritting](customization/overwritting.md)
* [Adding new features](customization/new_features.md)
### Features
* [OAuth](features/oauth.md)
* [GraphQL](features/graphql.md)
* [Templating](customization/templating.md)
* [Texts & Translations](customization/translations.md)
* [Images](customization/images.md)
* [Overwritting](customization/overwritting.md)
* [Adding new features](customization/new_features.md)
### Open Source project
* [Code of conduct](open_source/code_of_conduct.md)
* [Contributing](open_source/contributing.md)

View File

@@ -0,0 +1,3 @@
# GraphQL
Until we move the documentation to here, you can check https://github.com/consul/consul/blob/master/doc/api/api_en.md

30
docs/en/features/oauth.md Normal file
View File

@@ -0,0 +1,30 @@
# OAuth
You can configure authentication services with external OAuth suppliers, right now Twitter, Facebook and Google are supported.
## 1. Create an App on the platform
For each platform, go to their developers section and follow their guides to create an app.
## 2. Set your CONSUL's url
They'll ask you for your CONSUL's auth URL, and as you can see running `rake routes` at your CONSUL repo locally:
```bash
user_omniauth_authorize GET|POST /users/auth/:provider(.:format) users/omniauth_callbacks#passthru {:provider=>/twitter|facebook|google_oauth2/}
```
So for example the URL for facebook application would be `yourdomain.com/users/auth/facebook.json`
## 3. Set key & secret values
When you complete the application registration you'll get a *key* and *secret* values, those need to be stored at your `config/secrets.yml` file:
```yml
twitter_key: ""
twitter_secret: ""
facebook_key: ""
facebook_secret: ""
google_oauth2_key: ""
google_oauth2_secret: ""
```
*NOTE:* Also in the case of Google, verify that the APIs *Contacts API* and *Google+ API* are enabled for the application.