من أين أبدأ بمصادقة Firebase؟
تنظيم صفحاتك في مجموعات
يمكنك حفظ المحتوى وتصنيفه حسب إعداداتك المفضّلة.
لديّ نظام مصادقة من قبل
إذا كان تطبيقك يتضمّن تسجيل الدخول وتريد استخدامه
للمصادقة مع خدمات الخلفية في Firebase، استخدم المصادقة المخصصة. هذا النمط
التطبيقات التي تستخدم أيًا مما يلي:
- الحلول المخصصة، مثل الأنظمة المخصصة المستندة إلى كلمة المرور.
- خدمات إدارة الهوية التابعة لجهات خارجية، مثل Auth0 أو Okta.
- تُعد عمليات التكامل الحالية مع موفري الهوية الموحدة، مثل Google،
أو Facebook أو Apple. (وإذا لم تكن تدعم الهوية الموحدة بعد، ولكنك
ترغب في الاطلاع عليه، فراجع القسم التالي).
وباستخدام المصادقة المخصصة، يمكنك تسجيل دخول المستخدمين باستخدام النظام الذي تختاره،
إنشاء رمز Firebase المميز للمستخدم في الخلفية ثم استخدام الرمز
من العميل للمصادقة باستخدام Firebase.
راجِع مستندات
iOS+،
Android،
الويب،
Flutter،
الانسجام
C++.
أريد إنشاء نظام المصادقة باستخدام Firebase
إذا كنت بصدد إنشاء تطبيق جديد أو إضافة بيانات تسجيل الدخول إلى تطبيق حالي، فإن Firebase
والمكتبات والخدمات التي يمكنها مساعدتك في تنفيذ مصادقة آمنة بدون
الاضطرار إلى إنشاء واجهة المصادقة بنفسك. Firebase Authentication هو
حلّ الخلفية الكامل لتسجيل الدخول باستخدام كلمات المرور والهوية الموحّدة
ومقدمي الخدمات وروابط البريد الإلكتروني والرسائل النصية.
أريد حلاً فوريًا سهل الاستخدام
إنّ أسرع وأسهل طريقة لإضافة مصادقة إلى تطبيق هي استخدام
مصادقة FirebaseUI، وهي مكتبة واجهة مستخدم متنقلة. تُنفذ FirebaseUI المستخدِم المكتمل
لكل طرق تسجيل الدخول المتوافقة مع "Firebase Authentication".
نظرًا لأن مصادقة FirebaseUI عبارة عن حل بديل، فهي تحتوي على تجربة مستخدم محددة قد
لا تلبي احتياجاتك. إذا كنت ترغب في تغيير تجربة المستخدم، فيمكنك تقسيم المكتبة،
مفتوح المصدر، وتستخدم نسختك الخاصة. ومع ذلك، بالنسبة إلى
تدفقات تسجيل دخول مختلفة، فقد تفضل تنفيذ التدفقات الخاصة بك مع
لحزمة تطوير البرامج (SDK) لمنصّة Firebase كما هو موضَّح في القسم التالي.
الاطّلاع على مستندات مصادقة FirebaseUI لتطبيق
iOS،
Android
الويب:
أريد التحكّم بشكل كامل في تجربة تسجيل الدخول
لمزيد من التحكّم في تجربة تسجيل الدخول إلى تطبيقك، يمكنك تنفيذ تجربة
مسارات المصادقة واستخدام حزمة تطوير البرامج (SDK) لمنصّة Firebase للعمل مع حزمة
خدمات المصادقة. على سبيل المثال، يمكنك إنشاء عنوان بريد إلكتروني وكلمة مرور لك.
أو مسار "تسجيل الدخول باستخدام حساب Google" وتمرير عنوان البريد الإلكتروني وكلمة المرور
رمز مميّز لمعرّف Google إلى Firebase لمصادقة المستخدم.
يُرجى الاطّلاع على مستندات حزمة تطوير البرامج (SDK) "Firebase Authentication":
أريد إنشاء تجارب غنية عند تسجيل الدخول مسبقًا
يمكنك السماح للمستخدمين باستخدام ميزات تسجيل الدخول في تطبيقك قبل أن يتمكنوا من
تسجيل الدخول فعليًا باستخدام مصادقة مجهولة الهوية. باستخدام "تسجيل دخول" مجهول، يمكنك
حسابات مؤقتة لجلسة واحدة، والتي يمكنك استخدامها كحساب حقيقي. بعد ذلك، يُرجى اتّباع الخطوات التالية:
بعد أن يسجّل المستخدم الدخول أو يشترك، اربط الحساب المؤقت بالحساب
للسماح لهم بالمتابعة من حيث توقفوا.
تعمل ميزة المصادقة المجهولة إلى جانب أي من ميزات المصادقة المخصصة أو أي من Firebase
خدمات المصادقة.
راجِع مستندات
iOS+،
Android،
الويب،
Flutter،
الانسجام
C++.
أريد الوصول إلى خدمات Firebase من الخلفية
للوصول إلى خدمات Firebase من خادم، لا تحتاج إلى استخدام
Firebase Authentication بدلاً من ذلك، استخدِم Admin SDK. عندما تريد
تهيئة Admin SDK، يمكنك إجراء المصادقة باستخدام بيانات اعتماد حساب الخدمة،
التي تمثل مشروع Firebase بدلاً من مستخدم معين،
ومنحه حق الوصول الكامل إلى موارد مشروعك.
إنّ محتوى هذه الصفحة مرخّص بموجب ترخيص Creative Commons Attribution 4.0 ما لم يُنصّ على خلاف ذلك، ونماذج الرموز مرخّصة بموجب ترخيص Apache 2.0. للاطّلاع على التفاصيل، يُرجى مراجعة سياسات موقع Google Developers. إنّ Java هي علامة تجارية مسجَّلة لشركة Oracle و/أو شركائها التابعين.
تاريخ التعديل الأخير: 2025-07-25 (حسب التوقيت العالمي المتفَّق عليه)
[null,null,["تاريخ التعديل الأخير: 2025-07-25 (حسب التوقيت العالمي المتفَّق عليه)"],[],[],null,["I already have an authentication system\n\nIf your app already has a sign-in implementation and you want to use it to\nauthenticate with Firebase backend services, use **Custom Authentication**. This\nincludes apps that use any of the following:\n\n- Custom-built solutions, such as custom password-based systems.\n- Third-party identity management services, such as Auth0 or Okta.\n- Existing integrations with federated identity providers, such as Google, Facebook, or Apple. (And if you don't yet support federated identity, but you want to, see the next section.)\n\nWith custom authentication, you sign users in with the system of your choice,\ncreate a Firebase token for the user on your backend, and then use the token\nfrom the client to authenticate with Firebase.\n\nSee the docs for\n[iOS+](/docs/auth/ios/custom-auth),\n[Android](/docs/auth/android/custom-auth),\n[Web](/docs/auth/web/custom-auth),\n[Flutter](/docs/auth/flutter/custom-auth),\n[Unity](/docs/auth/unity/custom-auth), or\n[C++](/docs/auth/cpp/custom-auth).\n\nI want to build my authentication system with Firebase\n\nIf you're building a new app or adding sign-in to an existing app, Firebase has\nlibraries and services that can help you implement secure authentication without\nhaving to build the authentication backend yourself. Firebase Authentication is a\ncomplete backend solution for signing in with passwords, federated identity\nproviders, email links, and text messages.\n\nI want a drop-in solution that's easy to use\n\nThe fastest and easiest way to add authentication to an app is to use\n**FirebaseUI Auth** , a drop-in UI library. FirebaseUI implements complete user\nflows for all of Firebase Authentication's supported sign-in methods.\n\nBecause FirebaseUI Auth is a drop-in solution, it has a specific UX that might\nnot meet your needs. If you want to change the UX, you can fork the library,\nwhich is open source, and use your own version. However, for substantially\ndifferent sign-in flows, you might prefer to implement your own flows with the\nFirebase SDK as discussed in the next section.\n\nSee the FirebaseUI Auth docs for\n[iOS](/docs/auth/ios/firebaseui),\n[Android](/docs/auth/android/firebaseui), or\n[Web](/docs/auth/web/firebaseui).\n\nI want full control over the sign-in experience\n\nFor more control over your app's sign-in experience, you can implement your own\nauthentication flows and use the Firebase SDK to work with Firebase's\nauthentication services. For example, build your own email address and password\nflow or Google Sign-in flow, and pass the user's email address and password or\nGoogle ID token to Firebase to authenticate the user.\n\nSee the Firebase Authentication SDK docs:\n\n| Firebase services ||\n|----------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| **Email address and password sign-in** | [iOS+](/docs/auth/ios/password-auth) \\| [Android](/docs/auth/android/password-auth) \\| [Web](/docs/auth/web/password-auth) \\| [Flutter](/docs/auth/flutter/password-auth) \\| [Unity](/docs/auth/unity/password-auth) \\| [C++](/docs/auth/cpp/password-auth) |\n| **Phone number sign-in** | [iOS+](/docs/auth/ios/phone-auth) \\| [Android](/docs/auth/android/phone-auth) \\| [Web](/docs/auth/web/phone-auth) \\| [Flutter](/docs/auth/flutter/phone-auth) \\| [Unity](/docs/auth/unity/phone-auth) \\| [C++](/docs/auth/cpp/phone-auth) |\n| **Email link sign-in** | [iOS+](/docs/auth/ios/email-link-auth) \\| [Android](/docs/auth/android/email-link-auth) \\| [Web](/docs/auth/web/email-link-auth) \\| [Flutter](/docs/auth/flutter/email-link-auth) \\| [Unity](/docs/auth/unity/email-link-auth) \\| [C++](/docs/auth/cpp/email-link-auth) |\n| **Google** | [iOS+](/docs/auth/ios/google-signin) \\| [Android](/docs/auth/android/google-signin) \\| [Web](/docs/auth/web/google-signin) \\| [Flutter](/docs/auth/flutter/federated-auth#google) \\| [Unity](/docs/auth/unity/google-signin) \\| [C++](/docs/auth/cpp/google-signin) |\n| **Facebook** | [iOS+](/docs/auth/ios/facebook-login) \\| [Android](/docs/auth/android/facebook-login) \\| [Web](/docs/auth/web/facebook-login) \\| [Flutter](/docs/auth/flutter/federated-auth#facebook) \\| [Unity](/docs/auth/unity/facebook-login) \\| [C++](/docs/auth/cpp/facebook-login) |\n| **Apple** | [iOS+](/docs/auth/ios/apple) \\| [Android](/docs/auth/android/apple) \\| [Web](/docs/auth/web/apple) \\| [Flutter](/docs/auth/flutter/federated-auth#apple) \\| [Unity](/docs/auth/unity/apple) \\| [C++](/docs/auth/cpp/apple) |\n| **Play Games** | [Android](/docs/auth/android/play-games) \\| [Unity](/docs/auth/unity/play-games) \\| [C++](/docs/auth/cpp/play-games) |\n| **Game Center** | [iOS+](/docs/auth/ios/game-center) |\n| **GitHub** | [iOS+](/docs/auth/ios/github-auth) \\| [Android](/docs/auth/android/github-auth) \\| [Web](/docs/auth/web/github-auth) \\| [Flutter](/docs/auth/flutter/federated-auth#github) \\| [Unity](/docs/auth/unity/github-auth) \\| [C++](/docs/auth/cpp/github-auth) |\n| **Microsoft** | [iOS+](/docs/auth/ios/microsoft-oauth) \\| [Android](/docs/auth/android/microsoft-oauth) \\| [Web](/docs/auth/web/microsoft-oauth) \\| [Unity](/docs/auth/unity/microsoft-oauth) \\| [C++](/docs/auth/cpp/microsoft-oauth) |\n| **Twitter** | [iOS+](/docs/auth/ios/twitter-login) \\| [Android](/docs/auth/android/twitter-login) \\| [Web](/docs/auth/web/twitter-login) \\| [Flutter](/docs/auth/flutter/federated-auth#twitter) \\| [Unity](/docs/auth/unity/twitter-login) \\| [C++](/docs/auth/cpp/twitter-login) |\n| **Yahoo** | [iOS+](/docs/auth/ios/yahoo-oauth) \\| [Android](/docs/auth/android/yahoo-oauth) \\| [Web](/docs/auth/web/yahoo-oauth) \\| [Unity](/docs/auth/unity/yahoo-oauth) \\| [C++](/docs/auth/cpp/yahoo-oauth) |\n\nI want to build rich pre-sign-in experiences\n\nYou can enable users to use the signed-in features of your app before they\nactually sign in using **Anonymous Auth**. With anonymous \"sign-in\", you create\ntemporary single-session accounts, which you can use like a real account. Then,\nafter the user signs in or signs up, link the temporary account to the real\naccount to let them continue where they left off.\n\nAnonymous Auth works well alongside either Custom Auth or any of Firebase's\nauthentication services.\n\nSee the docs for\n[iOS+](/docs/auth/ios/anonymous-auth),\n[Android](/docs/auth/android/anonymous-auth),\n[Web](/docs/auth/web/anonymous-auth),\n[Flutter](/docs/auth/flutter/anonymous-auth),\n[Unity](/docs/auth/unity/anonymous-auth), or\n[C++](/docs/auth/cpp/anonymous-auth).\n\nI want to access Firebase services from my backend\n\nTo access Firebase services from a server, you don't need to use\nFirebase Authentication. Instead, use the [Admin SDK](/docs/admin/setup). When you\ninitialize the Admin SDK, you authenticate with service account credentials,\nwhich represent your Firebase project rather than a particular user, and which\ngrant full access to your project's resources."]]