Commit 9b29a196 by Dan Cech

update google auth config docs

parent 09a0a49c
...@@ -419,25 +419,33 @@ allowed_organizations = github google ...@@ -419,25 +419,33 @@ allowed_organizations = github google
## [auth.google] ## [auth.google]
You need to create a Google project. You can do this in the [Google First, you need to create a Google OAuth Client:
Developer Console](https://console.developers.google.com/project). When
you create the project you will need to specify a callback URL. Specify
this as callback:
```bash 1. Go to https://console.developers.google.com/apis/credentials
http://<my_grafana_server_name_or_ip>:<grafana_server_port>/login/google
```
This callback URL must match the full HTTP address that you use in your 2. Click the 'Create Credentials' button, then click 'OAuth Client ID' in the
browser to access Grafana, but with the prefix path of `/login/google`. menu that drops down
When the Google project is created you will get a Client ID and a Client
Secret. Specify these in the Grafana configuration file. For example: 3. Enter the following:
- Application Type: Web Application
- Name: Grafana
- Authorized Javascript Origins: https://grafana.mycompany.com
- Authorized Redirect URLs: https://grafana.mycompany.com/login/google
Replace https://grafana.mycompany.com with the URL of your Grafana instance.
4. Click Create
5. Copy the Client ID and Client Secret from the 'OAuth Client' modal
Specify the Client ID and Secret in the Grafana configuration file. For example:
```bash ```bash
[auth.google] [auth.google]
enabled = true enabled = true
client_id = YOUR_GOOGLE_APP_CLIENT_ID client_id = CLIENT_ID
client_secret = YOUR_GOOGLE_APP_CLIENT_SECRET client_secret = CLIENT_SECRET
scopes = https://www.googleapis.com/auth/userinfo.profile https://www.googleapis.com/auth/userinfo.email scopes = https://www.googleapis.com/auth/userinfo.profile https://www.googleapis.com/auth/userinfo.email
auth_url = https://accounts.google.com/o/oauth2/auth auth_url = https://accounts.google.com/o/oauth2/auth
token_url = https://accounts.google.com/o/oauth2/token token_url = https://accounts.google.com/o/oauth2/token
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment