Debian Codegraph @

docs/socialaccount/providers/gitlab.rst

raw
1 GitLab
2 ------
3
4 The GitLab provider works by default with https://gitlab.com. It allows you
5 to connect to your private GitLab server and use GitLab as an OAuth2
6 authentication provider as described in GitLab docs at
7 https://docs.gitlab.com/integration/oauth_provider/
8
9 The following GitLab settings are available, if unset https://gitlab.com will
10 be used, with a ``read_user`` scope.
11
12 GITLAB_URL:
13 Override endpoint to request an authorization and access token. For your
14 private GitLab server you use: ``https://your.gitlab.server.tld``
15
16 SCOPE:
17 The ``read_user`` scope is required for the login procedure, and is the default.
18 If more access is required, the scope should be set here.
19
20 Example:
21
22 .. code-block:: python
23
24 SOCIALACCOUNT_PROVIDERS = {
25 "gitlab": {
26 "SCOPE": ["api"],
27 "APPS": [
28 {
29 "client_id": "<insert-id>",
30 "secret": "<insert-secret>",
31 "settings": {
32 "gitlab_url": "https://your.gitlab.server.tld",
33 }
34 }
35 ]
36 },
37 }