Setting up Seafile

Seafile supports OIDC authentication through its Seahub frontend.

In order to enable OIDC, you may add the following settings to your `seahub_settings.py` file.

# Authentication
ENABLE_OAUTH = True
OAUTH_ENABLE_INSECURE_TRANSPORT = True
OAUTH_CLIENT_ID = "{{ service.config["client_id"] }}"
OAUTH_CLIENT_SECRET = "{{ service.config["client_secret"] }}"
OAUTH_REDIRECT_URL = "{{ service.config["redirect_uris"][0] }}"
OAUTH_PROVIDER_DOMAIN = ""
OAUTH_AUTHORIZATION_URL = "{{ url_for("sso.oidc_authorize", service_uuid=service.uuid, _external=True) }}"
OAUTH_TOKEN_URL = "{{ url_for("sso.oidc_authorize", service_uuid=service.uuid, _external=True) }}"
OAUTH_USER_INFO_URL = "{{ url_for("sso.oidc_authorize", service_uuid=service.uuid, _external=True) }}"
OAUTH_SCOPE = ["openid", "profile", "email"]
OAUTH_ATTRIBUTE_MAP = {
    "id": (False, "no_destination"),
    "name": (True, "name"),
    "email": (True, "email")
}
{% include "application_oidc.html" %}