Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Customize: Add GitHub authentication integration #602

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 38 additions & 2 deletions docs/customize/authentication.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,10 @@ After having registered a new client application in the ORCID website and having
the plugin and configuring key and secret. In your `invenio.cfg`:

```python
from invenio_oauthclient.contrib import orcid
from invenio_oauthclient.contrib.orcid import REMOTE_APP as ORCID_REMOTE_APP

OAUTHCLIENT_REMOTE_APPS = dict(
orcid=orcid.REMOTE_APP,
orcid=ORCID_REMOTE_APP,
)

ORCID_APP_CREDENTIALS = dict(
Expand All @@ -83,6 +83,42 @@ See the
plugin [documentation](https://invenio-oauthclient.readthedocs.io/en/latest/usage.html#module-invenio_oauthclient.contrib.orcid)
for more information.

#### GITHUB

To integrate GitHub authentication into InvenioRDM, follow the steps below:

- Register a New GitHub Application by Navigating to GitHub's [New OAuth Application page](https://github.com/settings/applications/new) to create a new OAuth application.
Provide the necessary details with special attention to the `Homepage URL` and `Authorization callback URL`, which should match your InvenioRDM instance's callback URL format:

```cfg
Homepage URL: https://127.0.0.1
Authorization callback URL: https://127.0.0.1/oauth/authorized/github
```

Change `https://127.0.0.1` to `SITE_UI_URL` in the `invenio.cfg` file to reflect your actual site URL.

After registration, GitHub will provide a `Client ID` and `Client Secret`. These credentials are essential for the OAuth integration.

- Configure GitHub login in InvenioRDM by enabling the plugin and add the key and secret. In your `invenio.cfg`:

```python
from invenio_oauthclient.contrib.github import REMOTE_APP as GITHUB_REMOTE_APP

# Setup Github Authentication
# ===========================

GITHUB_APP_CREDENTIALS = dict(
consumer_key="<my-key>",
consumer_secret="<my-secret>",
)

OAUTHCLIENT_REMOTE_APPS = dict(
github=GITHUB_REMOTE_APP,
)
```

If you encounter any issues, or if a `302` appears in your logs, seek help through this [resource](https://docs.github.com/en/apps/oauth-apps/maintaining-oauth-apps/troubleshooting-authorization-request-errors) or join the discussion on [discord](https://discord.gg/8qatqBC) for support.

#### Keycloak

[Keycloak](https://www.keycloak.org/) is an open-source solution for identity management
Expand Down
Loading