Skip to content

Commit

Permalink
Add Grafana backend
Browse files Browse the repository at this point in the history
  • Loading branch information
Rafael Muñoz Cárdenas authored and nijel committed Jun 10, 2022
1 parent 8c58210 commit c3b93fa
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
## [Unreleased](https://github.com/python-social-auth/social-docs/commits/master)

### Added
- Added Grafana OAuth2 backend documentation.
- Added note on using extra auth arguments in Coinbase backend.
- Added note on using tenants in Azure AD backend.
- Added note about Microsoft Graph support with AzureAD backend.
Expand Down
27 changes: 27 additions & 0 deletions docs/backends/grafana.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
Grafana
=======

Grafana works similar to Facebook (OAuth).

- On your project settings, you should add Grafana on your ``AUTHENTICATION_BACKENDS``::

AUTHENTICATION_BACKENDS = (
...
'social_core.backends.grafana.GrafanaOAuth2',
)

- Register a new application at `Grafana Cloud Portal` in grafana.com by doing
`My Account → SECURITY → OAuth Clients → Add OAuth Client Application`.
Set any name and in URL just the domain, without any path.

- Copy `client_id` and `client_secret` and add these values in your project settings file.

The ``client_id`` should be added on ``SOCIAL_AUTH_GRAFANA_KEY`` and the ``client_secret`` should be
added on ``SOCIAL_AUTH_GRAFANA_SECRET``::

SOCIAL_AUTH_GRAFANA_KEY = 'a1b2c3d4'
SOCIAL_AUTH_GRAFANA_SECRET = 'e5f6g7h8i9'

- The default scope is ```['profile', 'email']``` but it's possible to define it in settings with::

SOCIAL_AUTH_GRAFANA_SCOPE = [...]
1 change: 1 addition & 0 deletions docs/backends/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ Social backends
gitlab
gitea
google
grafana
instagram
itembase
jawbone
Expand Down

0 comments on commit c3b93fa

Please sign in to comment.