→ البرمجة والكود
💻 البرمجة والكود 🤖 ChatGPT
Implementing Authentication in a React Application
البرومبت
Act as a senior React developer with 5+ years of experience building secure web applications. Guide me through implementing a robust authentication system in a [React] application using [JWT] for token-based authentication. Cover the following steps: setting up a [Node.js backend] with user registration and login endpoints, integrating the frontend with axios for API calls, storing tokens securely using HTTP-only cookies or localStorage, and protecting routes with higher-order components (HOCs). Also, explain best practices for handling token expiration, refresh tokens, and CSRF protection. Provide code snippets for key components like the login form, protected route, and context/provider for global auth state management. Ensure the solution is scalable and follows security best practices.

كيف تستخدم هذا البرومبت؟

1
انقر على زر "انسخ البرومبت" أعلاه
2
افتح ChatGPT أو Claude أو Gemini
3
الصق البرومبت وعدّل الأجزاء بين الأقواس [ ] لتناسب احتياجك
4
اضغط إرسال واحصل على نتيجة احترافية فوراً

أسئلة شائعة

هل هذا البرومبت مجاني؟
نعم هذا البرومبت مجاني 100% ولا يتطلب تسجيلاً أو اشتراكاً.
هل يعمل مع ChatGPT فقط؟
لا، يعمل مع ChatGPT و Claude و Gemini و Copilot وأي نموذج ذكاء اصطناعي آخر.
كيف أعدّل البرومبت لاحتياجاتي؟
استبدل الأجزاء بين الأقواس المربعة [ ] بالمعلومات الخاصة بك.