{% extends "admin-base.html" %} {% from "ui.html" import csrf_field, action, copyable with context %} {% block page_title %}{{ _("Single sign-on") }}{% endblock %} {% block section_crumbs %}{{ _("Single sign-on") }}{% endblock %} {% block section %}

{{ _("Sign-in providers") }} {{ sso_providers|length }}

{{ _("Sign in with a GitLab, Google, GitHub or any OIDC account. An account is matched by its verified email address; signing in grants no rights: then add the person to organizations and spaces.") }}

{% for provider in sso_providers %}

{{ provider.name }}

{{ provider.slug }}{{ {"gitlab": "GitLab", "google": "Google", "github": "GitHub", "oidc": "OIDC"}.get(provider.kind, provider.kind) }}{% if not provider.enabled %}{{ _("disabled") }}{% endif %}
{% if provider.slug in open_providers %}{% endif %}
{{ _("Callback URL to register with the provider:") }}{{ copyable("callback-" ~ provider.slug, public_url ~ "/sso/" ~ provider.slug ~ "/callback", block=true) }}
{% if provider.issuer %}{{ provider.issuer }} · {% endif %}{{ _("account creation: {value}", value=_("yes") if provider.auto_create else _("no")) }} · {{ _("link by email: {value}", value=_("yes") if provider.link_by_email else _("no")) }} · {{ _("allowed domains: {value}", value=provider.allowed_domains|join(", ") if provider.allowed_domains else _("all")) }}
{{ _("Edit") }} {{ action("/admin/sso/" ~ provider.slug ~ "/delete", _("Delete"), confirm=_("Delete {name}? Its users will have to sign in another way.", name=provider.name), kind="danger") }}
{% else %}

{{ _("No provider: only local accounts can sign in.") }}

{% endfor %}
{% set p = editing %}
{% if p %}

{{ _("Edit the provider {name}", name=p.name) }}

{{ _("The client secret is never shown again: leave the field empty to keep it.") }} {{ _("Cancel") }}

{% else %}

{{ _("Add or edit a provider") }}

{{ _("An identifier already in use updates that provider.") }}

{% endif %} {{ csrf_field() }}

{{ _("Callback address: {url}", url=public_url ~ "/sso//callback") }}

{{ _("Shown as “Sign in with …” on the sign-in page.") }}

{{ _("For self-hosted GitLab and generic OIDC only.") }}

{{ _("Only these addresses can create an account or be linked automatically (exact domain, subdomains not included). Empty: no restriction, to avoid with GitHub and Google when automatic account creation is on.") }}

{{ _("Options") }}
{% endblock %}