رمز التفويض + PKCE
في هذا الدرس 4 موضوعات
هذا الدرس مخطط له. يعرض المخطط أدناه الموضوعات التي سيغطيها، ولم يُنشر الدرس الكامل بعد.
نص الدروس والتمارين باللغة الإنجليزية، بينما تبقى واجهة الموقع وعناوين الدروس بالعربية.
في هذا الدرس
follow the flow used by web, mobile, and single-page apps.
الموضوعات المخطط لها
- The client sends the user's browser to the authorization server to log in and approve.
- The server returns a short-lived authorization code to the client's redirect URL.
- The client swaps the code for tokens at the token endpoint.
- PKCE: the client invents a secret (
code_verifier), sends its hash (code_challenge) first, then proves it with the verifier. A stolen code is then useless. - Use this flow whenever a user logs in; current guidance recommends PKCE for all clients. The implicit grant and the password grant are not for new systems.
تفاصيل المخطط المبدئي
عرض عملي
a sequence diagram of the steps above with code_challenge and code_verifier marked.
اختبر فهمك
What problem does PKCE solve?
أظهر الإجابة
A stolen authorization code cannot be exchanged without the verifier.
التطبيق
طبّق هذا الدرس بمختبر الوحدة وتمارينها واختبارها.
تعليم الدرس كمكتمل اختياري ويمكنك التراجع عنه في أي وقت. يبقى تقدمك محفوظًا في هذا المتصفح.