From 6d843e3db510e051abe12e7a6eba004fd2ee241a Mon Sep 17 00:00:00 2001 From: Zihao Yu Date: Thu, 15 Sep 2016 05:29:03 -0400 Subject: [PATCH] update github oauth docs (#6042) --- docs/sources/installation/configuration.md | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/docs/sources/installation/configuration.md b/docs/sources/installation/configuration.md index 509695a273a..54cb2d95fee 100644 --- a/docs/sources/installation/configuration.md +++ b/docs/sources/installation/configuration.md @@ -276,9 +276,10 @@ example: scopes = user:email auth_url = https://github.com/login/oauth/authorize token_url = https://github.com/login/oauth/access_token - api_url = https://api.github.com + api_url = https://api.github.com/user allow_sign_up = false team_ids = + allowed_organizations = Restart the Grafana back-end. You should now see a GitHub login button on the login page. You can now login or sign up with your GitHub @@ -306,6 +307,24 @@ Grafana instance. For example: token_url = https://github.com/login/oauth/access_token allow_sign_up = false +### allowed_organizations + +Require an active organization membership for at least one of the given +organizations on GitHub. If the authenticated user isn't a member of at least +one of the organizations they will not be able to register or authenticate with +your Grafana instance. For example + + [auth.github] + enabled = true + client_id = YOUR_GITHUB_APP_CLIENT_ID + client_secret = YOUR_GITHUB_APP_CLIENT_SECRET + scopes = user:email,read:org + auth_url = https://github.com/login/oauth/authorize + token_url = https://github.com/login/oauth/access_token + allow_sign_up = false + # space-delimited organization names + allowed_organizations = github google +
## [auth.google] @@ -506,4 +525,3 @@ Set root url to a Grafana instance where you want to publish external snapshots ### external_snapshot_name Set name for external snapshot button. Defaults to `Publish to snapshot.raintank.io` -