-
alongside with #90, I'd like to authenticate my indico instance with GitLab, and need instructions. In #90, I found out that the callback URI is |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Luckily, I also found them myself, so here we go:
After creating the App you get the "Application ID" and an Application "Secret",
# for indico, use `AUTH_PROVIDERS` instead:
MULTIPASS_AUTH_PROVIDERS = {
# ...
'gitlab': {
'type': 'authlib',
'title': 'GitLab',
'authlib_args': {
'client_id': '', # put your Application ID here
'client_secret': '', # put your application Secret here
'client_kwargs': {'scope': 'read_user'},
'authorize_url': 'https://gitlab.com/oauth/authorize',
'access_token_url': 'https://gitlab.com/oauth/token',
'userinfo_endpoint': 'https://gitlab.com/api/v4/user',
}
},
}
# for indico, use `IDENTITIY_PROVIDERS` instead:
MULTIPASS_ IDENTITY_PROVIDERS = {
# ...
'gitlab': {
'type': 'authlib',
'identifier_field': 'id',
'mapping': {
'user_name': 'username',
}
},
} |
Beta Was this translation helpful? Give feedback.
Luckily, I also found them myself, so here we go:
register a new oauth application at https://gitlab.com/-/user_settings/applications (you probably can also register your application in a group namespace)
Example Conferences
https://indico.example.org/multipass/authlib/gitlab
False
read_user
(this is probably overkill, but at least it works :-))After creating the App you get the "Application ID" and an Application "Secret",
which are needed in the next step.