> For the complete documentation index, see [llms.txt](https://hacking-notes.jord4n.pro/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://hacking-notes.jord4n.pro/ar/web/oauth-authentication/oauth-login-bypass-via-implicit-flow.md).

# تجاوز تسجيل دخول OAuth عبر التدفق الضمني

### تجاوز المصادقة عبر التدفق الضمني لـ OAuth

#### سياق المختبر

تستخدم هذه المختبرية مزوِّدًا **OAuth** لتمكين الاتصال عبر حساب شبكة اجتماعية. / بسبب عدم كفاية **التحقق في تطبيق العميل**, من الممكن الاتصال بحساب مستخدم آخر **دون معرفة كلمة مروره**.

الهدف: تسجيل الدخول باسم **carlos** (البريد الإلكتروني: `carlos@carlos-montoya.net`). / حساب الوسائط الاجتماعية المتاح: `wiener:peter`.

#### الملاحظات

* عند محاولة تسجيل الدخول، يعيد التطبيق التوجيه إلى صفحة OAuth:
  * *«نحن الآن نعيد توجيهك لتسجيل الدخول باستخدام وسائل التواصل الاجتماعي...»*

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

* بعد المصادقة على نطاق OAuth وقبول الأذونات (الملف الشخصي + البريد الإلكتروني)، يرسل التطبيق بعد ذلك طلبًا إلى نقطة نهاية داخلية، وعادةً ما تكون:
* `POST /authenticate`

<figure><img src="/files/908ddac2dc0919d93e7888cc0d6c6be4d3a2c784" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/db472e3f4d5f4fe231791ca7a4ab3e4b55e5da70" alt=""><figcaption></figcaption></figure>

* يحتوي هذا الطلب على JSON من النوع:

{% code overflow="wrap" %}

```json
{
"email":"wiener@hotdog.com",
"username":"wiener",
"token":"MkydN3cYAC6wsKXQJEd5tD3kW1nB9MoWqzdfhyL6BtE"
}
```

{% endcode %}

النقطة الأساسية: التطبيق **يثق بـ** الـ `البريد الإلكتروني` و `اسم المستخدم` الحقول المرسلة من قبل العميل، بدلاً من **بصرامة** ربط هذه القيم بـ `رمز`.

```json
{
"email":"carlos@carlos-montoya.net",
"username":"carlos",
"token":"MkydN3cYAC6wsKXQJEd5tD3kW1nB9MoWqzdfhyL6BtE"
}
```

#### الاستغلال

1. عادةً، اتصل عبر OAuth بالحساب **wiener**.
2. اعترض الطلب المرسل إلى `POST /authenticate`.
3. غيّر حقول الهوية فقط، مع الإبقاء على نفس `رمز`:

<figure><img src="/files/2cc9c82a49898a3b716c40c70c9ff96ca4fb2efd" alt=""><figcaption></figcaption></figure>

4. أرسل الطلب المعدّل.

#### النتيجة

* يردّ الخادم **`302 Found`**، مما يشير إلى أنه تم إنشاء الجلسة وأن التطبيق يعتبر المستخدم مصادَقًا عليه.
* ثم نحصل على جلسة \*\*متصلة باسم كارلوس\*\*.

<figure><img src="/files/a82a01aaafe2c808fe16f9640cf3e84f1974200f" alt=""><figcaption></figcaption></figure>


---

# 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://hacking-notes.jord4n.pro/ar/web/oauth-authentication/oauth-login-bypass-via-implicit-flow.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.
