> 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/ar/aliadadat/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="/spaces/X3HLvwDr0DrRmyeXKs0P/pages/5edb2b899a137d3435cad6311d40b3f8e840aa41" %}
[مصادقة OIDC](/on-premises/ar/aliadadat/overleaf-toolkit/authentication/oidc-authentication.md)
{% endcontent-ref %}

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

{% column width="50%" %}
{% content-ref url="/spaces/X3HLvwDr0DrRmyeXKs0P/pages/329a2fd244cbe0fd26ff2c8cd39736cdb09e938f" %}
[مصادقة SAML](/on-premises/ar/aliadadat/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://overleaf-pro.ayaka.space/on-premises/ar/aliadadat/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.
