-
I'm currently trying to authenticate my indico instance with GitHub. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Turns out it is not overly complicated, once you know what you are doing. Assuming your Indico instance is running on https://indico.example.com/:
# for indico, use `AUTH_PROVIDERS` instead:
MULTIPASS_AUTH_PROVIDER = {
# ...
'github': {
'type': 'authlib',
'title': 'GitHub',
'authlib_args': {
'client_id': '', # put your client id here
'client_secret': '', # put your client secret here
'client_kwargs': {'scope': 'user:email'},
'authorize_url': 'https://github.com/login/oauth/authorize',
'access_token_url': 'https://github.com/login/oauth/access_token',
'userinfo_endpoint': 'https://api.github.com/user',
}
},
}
# for indico, use `IDENTITY_PROVIDERS` instead:
MULTIPASS_IDENTITY_PROVIDERS = {
# ...
'github': {
'type': 'authlib',
'identifier_field': 'id',
'mapping': {
'user_name': 'login',
'affiliation': 'company'
}
}
} The name you picked for the auth/identity provider (here: |
Beta Was this translation helpful? Give feedback.
Turns out it is not overly complicated, once you know what you are doing.
Assuming your Indico instance is running on https://indico.example.com/:
register a new OAuth application at https://github.com/settings/applications/new
Indico example
https://indico.example.org/
allow github users for our indico instance
https://indico.example.org/multipass/authlib/github
False
After creating the App you get the "Client ID" and can generate a "Client secret",
which are needed in the next step.
add the 'github' auth/identity provider to your application configuration:
# for indico, use `AUTH_…