{% extends "admin/layout.html" %} {% block admin %}

{% if provider.configured %}{{ provider.provider_name }}{% if !provider.enabled %} (off){% endif %}{% else %}Add an identity provider{% endif %}

All providers

Register this site with the provider using the callback URL below, then enter what it gave you. Saving reaches the provider first - its discovery document, or GitHub's API - so a wrong issuer is refused before anything is stored.

GitHub: create an OAuth App (Settings → Developer settings) with this callback URL and enter its client id and secret (GitHub cannot complete a sign-in without one); leave the issuer empty for github.com or name your GitHub Enterprise Server; scopes read:user user:email read:org; the identity claim sub is the account's numeric id (stable), login the user name (which GitHub lets people change and later hands to someone else - keep sub unless you accept that); groups are the organizations and org/team slugs the person belongs to, so a role map reads my-org=editor,my-org/maintainers=approver. An organization that restricts third-party access lists itself only once it has approved the app.

{% if provider.configured %}

Set up by {{ provider.updated_by }}, {{ provider.updated_at|datetime }}; its handle is {{ provider.id }}.{% if provider.has_secret %} A client secret is stored, sealed under this site's session secret.{% else %} No client secret: a public client, protected by PKCE.{% endif %}

{% endif %} {% if !can_seal %}

Without OKF_WEB_SESSION_SECRET this site cannot keep a client secret (and every session ends when it restarts). Set it to use a confidential client; a public client works without one, though some providers (GitHub, Google, Entra ID's web registrations) insist on a secret.

{% endif %} {% if let Some(why) = trouble %}

The stored settings cannot be used by this instance, so the provider is not offered: {{ why }}. After a change of OKF_WEB_SESSION_SECRET, enter the client secret again and save.

{% endif %}
{% if provider.has_secret %}{% endif %}
{% if provider.configured %}{% endif %}
{% endblock %}