> 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/pl/konfiguracja/overleaf-toolkit/authentication.md).

# Uwierzytelnianie

Ta funkcja jest rozwijana przez [yu-i-i/overleaf-cep](https://github.com/yu-i-i/overleaf-cep). Obsługiwane są 3 metody uwierzytelniania. Po konfiguracji możesz zalogować się za pomocą następujących opcji, jak pokazano na poniższym obrazie.

<figure><img src="/files/61a132cea0af0f6e1c07d0876c330ebf0f5a4a13" alt=""><figcaption></figcaption></figure>

Zdecydowanie zalecamy korzystanie z OIDC, ponieważ jest to najbardziej uniwersalna metoda.

{% columns %}
{% column width="50%" %}
{% content-ref url="/spaces/ArDYbrbF4KoHBS5wRUkg/pages/e9a9b6a84edbac022ce1324159e11af4f69fb8ab" %}
[Uwierzytelnianie OIDC](/on-premises/pl/konfiguracja/overleaf-toolkit/authentication/oidc-authentication.md)
{% endcontent-ref %}

{% content-ref url="/spaces/ArDYbrbF4KoHBS5wRUkg/pages/e689bfaa512d342cdc364586b28b7b421400dd6b" %}
[Uwierzytelnianie LDAP](/on-premises/pl/konfiguracja/overleaf-toolkit/authentication/ldap-authentication.md)
{% endcontent-ref %}
{% endcolumn %}

{% column width="50%" %}
{% content-ref url="/spaces/ArDYbrbF4KoHBS5wRUkg/pages/6e2dde30e9b18d44d3822f3ca805515d9c13dfc3" %}
[Uwierzytelnianie SAML](/on-premises/pl/konfiguracja/overleaf-toolkit/authentication/saml-authentication.md)
{% endcontent-ref %}

{% endcolumn %}
{% endcolumns %}

### Konfiguracja globalna

Zmienna środowiskowa `EXTERNAL_AUTH` jest wymagane, aby włączyć konkretny moduł uwierzytelniania. Ta zmienna środowiskowa określa, które zewnętrzne metody uwierzytelniania są aktywne. Dostępne opcje to (małymi literami):

* saml
* ldap
* oidc

### Sugestie dotyczące SSO

Testowałem saml, ldap, oauth w Overleaf. Zarówno saml, jak i oauth działają dobrze w Overleaf, ale z ldap to zależy. Nie działa dobrze dla <https://docs.goauthentik.io/>, ale działa dobrze w openLDAP (<https://github.com/rroemhild/docker-test-openldap>).

{% hint style="info" %}
Musimy zaktualizować passport-ldapauth, ostatnio próbuję testować LDAP Overleaf z <https://goauthentik.io/> , ale się nie powiodło. Po zaktualizowaniu "passport-ldapauth" do 3.0.0 wszystko działa dobrze.

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

Oryginalna wersja to 2.x.x, która pochodzi sprzed 6 lat.
{% endhint %}

Nie jestem pewien, jaka jest przyczyna, ponieważ wszyscy polegamy na zewnętrznym pakiecie do uwierzytelniania LDAP (także saml, oauth). Jeśli to nie działa, sytuacja może być taka sama dla Overleaf Server Pro, ponieważ przekazujemy tylko wszystkie zmienne środowiskowe do wewnętrznego pakietu; jeśli są tam jakieś błędy, obecnie nie mamy pojęcia.

**Dlatego gorąco polecam naszym użytkownikom skonfigurowanie środowiska deweloperskiego, aby testować SSO z całym kodem źródłowym**, który jest dostępny pod [Setup Develop Environment (Local)](/dev/environment/setup-develop-environment-local.md). W środowisku deweloperskim możesz zobaczyć wszystkie logi w terminalu, co ułatwia debugowanie.

\ <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/pl/konfiguracja/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.
