> For the complete documentation index, see [llms.txt](https://overleaf-pro.ayaka.space/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://overleaf-pro.ayaka.space/on-premises/fr/configuration/overleaf-toolkit/authentication.md).

# Authentification

Cette fonctionnalité a été développée par [yu-i-i/overleaf-cep](https://github.com/yu-i-i/overleaf-cep). Il existe 3 méthodes d'authentification prises en charge. Après configuration, vous pouvez vous connecter avec les options suivantes, comme le montre l'image ci-dessous.

<figure><img src="/files/5c7b649c76ba246c5c42e4a7ac38b9984fea136a" alt=""><figcaption></figcaption></figure>

Nous vous recommandons vivement d'utiliser OIDC, car c'est la méthode la plus générale.

{% columns %}
{% column width="50%" %}
{% content-ref url="/spaces/IG3wh4WXIydQl7cvEu9K/pages/a71983835d84a5b8fac573e57424a8ccea822b93" %}
[Authentification OIDC](/on-premises/fr/configuration/overleaf-toolkit/authentication/oidc-authentication.md)
{% endcontent-ref %}

{% content-ref url="/spaces/IG3wh4WXIydQl7cvEu9K/pages/532d9beac2a655bfe1876a072db7e89a97465efa" %}
[Authentification LDAP](/on-premises/fr/configuration/overleaf-toolkit/authentication/ldap-authentication.md)
{% endcontent-ref %}
{% endcolumn %}

{% column width="50%" %}
{% content-ref url="/spaces/IG3wh4WXIydQl7cvEu9K/pages/3c0944b5e08e6cd2d74e3972e0596df0b27f75e7" %}
[Authentification SAML](/on-premises/fr/configuration/overleaf-toolkit/authentication/saml-authentication.md)
{% endcontent-ref %}

{% endcolumn %}
{% endcolumns %}

### Configuration globale

La variable d'environnement `EXTERNAL_AUTH` est requis pour activer le module d'authentification spécifique. Cette variable d'environnement précise quelles méthodes d'authentification externes sont activées. Les options disponibles sont (en minuscules) :

* saml
* ldap
* oidc

### Suggestions pour le SSO

J'ai testé saml, ldap, oauth pour Overleaf. saml et oauth fonctionnent bien dans Overleaf, mais pour ldap, cela dépend. Cela ne peut pas bien fonctionner pour <https://docs.goauthentik.io/>, mais cela fonctionne bien avec OpenLDAP (<https://github.com/rroemhild/docker-test-openldap>).

{% hint style="info" %}
Nous devons mettre à jour passport-ldapauth ; récemment, j'essaie de tester ldap d'Overleaf avec <https://goauthentik.io/> , cela a échoué. Après avoir mis à jour "passport-ldapauth" en 3.0.0, tout fonctionne bien.

```
"passport-ldapauth": "^3.0.0",
```

L'original était en 2.x.x, il y a 6 ans.
{% endhint %}

Je ne suis pas sûr de la raison, car nous dépendons tous d'un paquet externe pour l'authentification LDAP (ainsi que saml, oauth). Si cela ne fonctionne pas, la situation peut être la même pour Overleaf Server Pro, parce que nous avons simplement transmis toutes les variables d'environnement au paquet interne ; s'il y a des bugs, nous n'en avons actuellement aucune idée.

**Je recommande donc vivement à nos utilisateurs de configurer un environnement de développement pour tester le SSO avec l'ensemble du code source**, qui est disponible à [Setup Develop Environment (Local)](/dev/environment/setup-develop-environment-local.md). Dans un environnement de développement, vous pouvez voir tous les journaux dans le terminal, ce qui facilite le débogage.

\ <br>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://overleaf-pro.ayaka.space/on-premises/fr/configuration/overleaf-toolkit/authentication.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
