> 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/on-premises-no/konfigurasjon/overleaf-toolkit/authentication.md).

# Autentisering

Denne funksjonen er utviklet av [yu-i-i/overleaf-cep](https://github.com/yu-i-i/overleaf-cep). Det støttes 3 autentiseringsmetoder. Etter konfigurering kan du logge inn med følgende alternativer, slik bildet nedenfor viser.

<figure><img src="/files/74dc902cb64b65ee7710caff3d73c1d8ccf5beb6" alt=""><figcaption></figcaption></figure>

Vi anbefaler sterkt at du bruker OIDC, siden dette er den mest generelle metoden.

{% columns %}
{% column width="50%" %}
{% content-ref url="/spaces/HCPqgULvVMcAMebaNSci/pages/658e78b12c58741c4cdf95ccc51fe60a588ad2d8" %}
[OIDC-autentisering](/on-premises/on-premises-no/konfigurasjon/overleaf-toolkit/authentication/oidc-authentication.md)
{% endcontent-ref %}

{% content-ref url="/spaces/HCPqgULvVMcAMebaNSci/pages/1855d5b6d414cc954ce53c125474c412911ee4fe" %}
[LDAP-autentisering](/on-premises/on-premises-no/konfigurasjon/overleaf-toolkit/authentication/ldap-authentication.md)
{% endcontent-ref %}
{% endcolumn %}

{% column width="50%" %}
{% content-ref url="/spaces/HCPqgULvVMcAMebaNSci/pages/c6684a9007d7b2434246c7d6d8967128760152aa" %}
[SAML-autentisering](/on-premises/on-premises-no/konfigurasjon/overleaf-toolkit/authentication/saml-authentication.md)
{% endcontent-ref %}

{% endcolumn %}
{% endcolumns %}

### Global konfigurasjon

Miljøvariabelen `EXTERNAL_AUTH` er nødvendig for å aktivere den spesifikke autentiseringsmodulen. Denne miljøvariabelen angir hvilke eksterne autentiseringsmetoder som er aktivert. Tilgjengelige alternativer er (med små bokstaver):

* saml
* ldap
* oidc

### Forslag til SSO

Jeg testet saml, ldap og oauth for Overleaf. Både saml og oauth fungerer bra i Overleaf, men ldap avhenger. Det kan ikke fungere godt for <https://docs.goauthentik.io/>, men det fungerer bra i OpenLDAP (<https://github.com/rroemhild/docker-test-openldap>).

{% hint style="info" %}
Vi må oppdatere passport-ldapauth. I det siste har jeg prøvd å teste Overleaf LDAP med <https://goauthentik.io/> , mislyktes det. Etter at jeg oppdaterte "passport-ldapauth" til 3.0.0, fungerer alt bra.

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

Den opprinnelige er 2.x.x, som er seks år gammel.
{% endhint %}

Jeg er ikke sikker på hva årsaken er, fordi vi alle er avhengige av en ekstern pakke for å håndtere LDAP- (også saml, oauth-) autentisering. Hvis det ikke fungerer, kan situasjonen være den samme for Overleaf Server Pro, fordi vi bare sender alle miljøvariabler til den interne pakken. Hvis det finnes noen feil, har vi ingen anelse foreløpig.

**Så jeg anbefaler sterkt at brukerne våre setter opp et utviklingsmiljø for å teste SSO med all kildekoden**, som er tilgjengelig på [Setup Develop Environment (Local)](/dev/environment/setup-develop-environment-local.md). I utviklingsmiljøet kan du se alle logger i terminalen, noe som gjør det praktisk for feilsøking.

\ <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/on-premises-no/konfigurasjon/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.
