> For the complete documentation index, see [llms.txt](https://ayakaleaf-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://ayakaleaf-pro.ayaka.space/on-premises/ar/althyeh/overleaf-toolkit/authentication.md).

# المصادقة

تم تطوير هذه الميزة بواسطة [yu-i-i/overleaf-cep](https://github.com/yu-i-i/overleaf-cep). توجد 3 طرق مصادقة مدعومة. بعد الإعداد، يمكنك تسجيل الدخول باستخدام الخيارات التالية، كما تُظهر الصورة أدناه.

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

نوصي بشدة باستخدام OIDC، لأنه الطريقة الأكثر عمومية.

{% columns %}
{% column width="50%" %}
{% content-ref url="/pages/5edb2b899a137d3435cad6311d40b3f8e840aa41" %}
[مصادقة OIDC](/on-premises/ar/althyeh/overleaf-toolkit/authentication/oidc-authentication.md)
{% endcontent-ref %}

{% content-ref url="/pages/96c3eec2965c7d3eceb08f9303fc0acb4ce637fc" %}
[مصادقة LDAP](/on-premises/ar/althyeh/overleaf-toolkit/authentication/ldap-authentication.md)
{% endcontent-ref %}
{% endcolumn %}

{% column width="50%" %}
{% content-ref url="/pages/329a2fd244cbe0fd26ff2c8cd39736cdb09e938f" %}
[مصادقة SAML](/on-premises/ar/althyeh/overleaf-toolkit/authentication/saml-authentication.md)
{% endcontent-ref %}
{% endcolumn %}
{% endcolumns %}

### الإعداد العام

متغير البيئة `EXTERNAL_AUTH` مطلوب لتمكين وحدة المصادقة المحددة. يحدد متغير البيئة هذا طرق المصادقة الخارجية التي يتم تفعيلها. الخيارات المتاحة هي (بحروف صغيرة):

* saml
* ldap
* oidc

### اقتراحات لـ SSO

لقد اختبرت saml وldap وoauth مع Overleaf. كلٌّ من saml وoauth يعملان جيدًا في Overleaf، أما ldap فالأمر يعتمد. لا يمكنه أن يعمل جيدًا مع <https://docs.goauthentik.io/>، لكنه يعمل جيدًا في openLDAP (<https://github.com/rroemhild/docker-test-openldap>).

{% hint style="info" %}
نحتاج إلى تحديث passport-ldapauth، فقد كنتُ مؤخرًا أحاول اختبار ldap الخاص بـ Overleaf مع <https://goauthentik.io/> ، لكنه فشل. بعد ما حدّثتُ "passport-ldapauth" إلى 3.0.0، أصبح كل شيء يعمل جيدًا.

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

الإصدار الأصلي كان 2.x.x، وذلك قبل 6 سنوات.
{% endhint %}

لست متأكدًا من السبب، لأننا نعتمد جميعًا على حزمة خارجية لإجراء مصادقة LDAP (وأيضًا saml وoauth). إذا لم يعمل ذلك، فقد يكون الوضع نفسه بالنسبة إلى overleaf server pro، لأننا نمرّر جميع متغيرات البيئة إلى الحزمة الداخلية؛ وإذا كانت هناك بعض الأخطاء، فلا فكرة لدينا عنها حاليًا.

**لذلك أوصي بشدة مستخدمينا بإعداد بيئة تطوير لاختبار SSO مع كامل الشيفرة المصدرية**، والمتاحة على [Setup Develop Environment (Local)](/dev/environment/setup-develop-environment-local.md). في بيئة التطوير، يمكنك رؤية جميع السجلات في الطرفية، مما يجعل استخدامها مناسبًا للتصحيح.

\ <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://ayakaleaf-pro.ayaka.space/on-premises/ar/althyeh/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.
