نقل ميزة تسجيل الدخول باستخدام رابط البريد الإلكتروني من "روابط Firebase الديناميكية" (لنظام التشغيل iOS)
تنظيم صفحاتك في مجموعات
يمكنك حفظ المحتوى وتصنيفه حسب إعداداتك المفضّلة.
كانت مصادقة رابط البريد الإلكتروني تعتمد سابقًا على Firebase Dynamic Links، وسيتم إيقافها نهائيًا في 25 أغسطس 2025. لقد نشرنا حلاً بديلاً في الإصدار 11.8.0 أو إصدار أحدث من حزمة تطوير البرامج (SDK) لنظام التشغيل iOS. إذا كان تطبيقك يستخدم Firebase Dynamic Links، عليك نقل بيانات تطبيقك إلى نظام Firebase Hosting الجديد.Firebase Authentication
نقل نطاق Firebase Dynamic Links المرتبط بك إلى نطاق Firebase Hosting
من الآن فصاعدًا، بدلاً من استخدام النطاق Firebase Dynamic Links، سيستخدم Firebase Authentication النطاق التلقائي Firebase Hosting لمشروعك من أجل إنشاء روابط لإجراءات الروابط عبر البريد الإلكتروني وغيرها من إجراءات الروابط خارج النطاق في التطبيقات على الأجهزة الجوّالة. وهذا يعني أنّه يجب أيضًا تعديل تطبيقك لاستخدام هذا النطاق التلقائي كنطاق مرتبط بروابط مصادقة البريد الإلكتروني لتطبيقك على الأجهزة الجوّالة.
استخدِم التعليمات التالية للتعامل مع الروابط من النطاق الجديد ولتوجيه Firebase Authentication إلى البدء في استخدام النطاق Firebase Hosting لإنشاء روابط تطبيقات الأجهزة الجوّالة من الآن فصاعدًا.
إذا أردت مواصلة استخدام أي من نطاقات Firebase Hosting المخصّصة
أو حتى نطاق Firebase Dynamic Links المخصّص ليكون نطاقك المرتبط الجديد،
اتّبِع التعليمات الواردة في قسم تخصيص الروابط المتوافقة مع الأجهزة الجوّالة
وعدِّل الخطوات لتتطابق مع النطاق المطلوب استخدامه.
ربط نطاق Firebase Hosting بنطاق تطبيقك المرتبط
عليك ضبط النطاق المحدّد كنطاق مرتبط لروابط التطبيقات. لإعداد إذن الوصول في تطبيقك، افتح علامة التبويب التوقيع والقدرات الخاصة بالتطبيق المستهدف في Xcode وأضِف نطاقات Firebase Hosting من الخطوة السابقة إلى إذن الوصول "النطاقات المرتبطة ". في حال استخدام نطاق Firebase Hosting التلقائي، سيكون هذا النطاق applinks:PROJECT_ID.firebaseapp.com.
لمزيد من المعلومات، يمكنك الاطّلاع على دعم النطاقات المرتبطة على موقع مستندات Apple الإلكتروني.
تم نشر ملف نطاق مرتبط ضمن جميع نطاقاتك Firebase Hosting. للوصول إلى هذه الصفحة، انتقِل إلى
PROJECT_ID.firebaseapp.com/.well-known/apple-app-site-association.
يمكن استبدال ملف AASA هذا. لمزيد من المعلومات، يُرجى الاطّلاع على إنشاء ملفات إعداد الروابط العامة واستضافتها.
إعداد مشروعك لاستخدام الروابط الجديدة
عندما تكون مستعدًا للتعامل مع روابط النطاقات الجديدة، يمكنك استخدام Firebase Admin SDK لتعديل طريقة إنشاء روابط البريد الإلكتروني وإصدار تعليمات إلى الخلفية لبدء إنشاء الروابط باستخدام النطاق الجديد Firebase Hosting.
import{getAuth}from'firebase-admin/auth';constupdateEmailAuthDomain=async()=>{constupdateRequest={mobileLinksConfig:{domain:'HOSTING_DOMAIN',},};constprojectConfigManager=getAuth().projectConfigManager();try{constresponse=awaitprojectConfigManager.updateProjectConfig(updateRequest);// Updated project configconsole.log('Project configuration updated successfully:',response);}catch(error){console.error('Error updating the project:',error);}};
إرسال رابط الرسالة الإلكترونية واستخدامه
أرسِل رابط تسجيل الدخول عبر البريد الإلكتروني كما كان من قبل. عندما ينقر مستخدم نهائي على الرابط، ستتم إعادة توجيهه إلى التطبيق إذا كان مثبّتًا لإكمال عملية تسجيل الدخول.
تخصيص الروابط المتوافقة مع الأجهزة الجوّالة
يمكنك استخدام Firebase Hosting نطاق مخصّص أو إعادة استخدام نطاقك المخصّص
Firebase Dynamic Links ليكون نطاق الروابط الجديد على الأجهزة الجوّالة.
يمكنك إعادة استخدام أي من نطاقات Firebase Dynamic Links كنطاق مخصّص. ومع ذلك، لن يعود أي من وظائف Firebase Dynamic Links متوافقًا (على سبيل المثال، لن يتمكّن المستخدمون من إعادة التوجيه إلى متجر التطبيقات إذا لم يكن التطبيق مثبّتًا على أجهزتهم).
تاريخ التعديل الأخير: 2025-09-05 (حسب التوقيت العالمي المتفَّق عليه)
[[["يسهُل فهم المحتوى.","easyToUnderstand","thumb-up"],["ساعَدني المحتوى في حلّ مشكلتي.","solvedMyProblem","thumb-up"],["غير ذلك","otherUp","thumb-up"]],[["لا يحتوي على المعلومات التي أحتاج إليها.","missingTheInformationINeed","thumb-down"],["الخطوات معقدة للغاية / كثيرة جدًا.","tooComplicatedTooManySteps","thumb-down"],["المحتوى قديم.","outOfDate","thumb-down"],["ثمة مشكلة في الترجمة.","translationIssue","thumb-down"],["مشكلة في العيّنات / التعليمات البرمجية","samplesCodeIssue","thumb-down"],["غير ذلك","otherDown","thumb-down"]],["تاريخ التعديل الأخير: 2025-09-05 (حسب التوقيت العالمي المتفَّق عليه)"],[],[],null,["Email link authentication previously relied on Firebase Dynamic Links, which will be\n[shut down on August 25, 2025](/support/dynamic-links-faq). We've published an\nalternative solution in the Firebase Authentication iOS SDK version 11.8.0+. If your\napp uses Firebase Dynamic Links, you should migrate your app to the new\nFirebase Hosting based system.\n\nMigrate your associated Firebase Dynamic Links domain to a Firebase Hosting domain\n\nMoving forward, rather than using a Firebase Dynamic Links domain, Firebase Authentication\nwill use the Firebase Hosting default domain for your project to create\nlinks for email link and other out-of-band link actions in mobile apps. This\nmeans that your app will also need to be updated to use this default domain as\nthe associated domain for email authentication links to your mobile app.\n\nYou can follow the instructions in\n[Authenticate with Firebase Using Email Link on Apple Platforms](/docs/auth/ios/email-link-auth)\nto update your app to use the new automatically provisioned Firebase Hosting\ndefault domain.\n\nUse the following instructions to handle links from the new domain and to\ninstruct Firebase Authentication to start using the Firebase Hosting domain to\ngenerate mobile app links going forward.\n\nIf you'd like to continue using any of your custom Firebase Hosting domains\nor even your custom Firebase Dynamic Links domain to be your new associated domain,\nusing the instructions in the [Customize Mobile Links](#customize-mobile-links)\nsection, adapt the steps to match the intended domain you'd like to use.\n\n1. **Link Firebase Hosting domain to your app associated domain.**\n\n You'll need to configure the selected domain as an Associated Domain for\n app links. To set up the entitlement in your app, open the target's\n **Signing \\& Capabilities** tab in Xcode and add Firebase Hosting domains\n from the previous step to the Associated Domains capability. If using the\n default Firebase Hosting domain, this will be\n `applinks:`\u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e`.firebaseapp.com`.\n\n See [Supporting associated domains](https://developer.apple.com/documentation/xcode/supporting-associated-domains)\n on Apple's documentation site for more information.\n\n An associated domain file has been deployed under all your\n Firebase Hosting domains. To access it, navigate to\n \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e`.firebaseapp.com/.well-known/apple-app-site-association`.\n This AASA file can be overwritten; see\n [Create and host your Universal Links configuration files](/support/guides/app-links-universal-links#create_and_host_your_universal_links_configuration_files_on_your_new_hosting_domain)\n for more information.\n | **Important:** To ensure a seamless rollback, we recommend keeping your existing intent filter that handles Firebase Dynamic Links while trying out the Firebase Hosting link solution. The Firebase Dynamic Links solution will be available until August 25, 2025.\n2. **Configure your project to use the new links.**\n\n When you're ready to handle the new domain links, you can use the\n [Firebase Admin SDK](/docs/admin/setup) to update how you want email links\n to be generated and instruct our backend to start generating links using the\n new Firebase Hosting domain. \n\n import { getAuth } from 'firebase-admin/auth';\n\n const updateEmailAuthDomain = async () =\u003e {\n const updateRequest = {\n mobileLinksConfig: {\n domain: 'HOSTING_DOMAIN',\n },\n };\n\n const projectConfigManager = getAuth().projectConfigManager();\n\n try {\n const response = await projectConfigManager.updateProjectConfig(updateRequest);\n // Updated project config\n console.log('Project configuration updated successfully:', response);\n } catch (error) {\n console.error('Error updating the project:', error);\n }\n };\n\n | **Important:** To rollback to the Firebase Dynamic Links while implementing and testing the backup solution, you should set the domain back to `FIREBASE_DYNAMIC_LINK`. The Firebase Dynamic Links solution will be available until August 25, 2025.\n3. **Send and redeem the email link.**\n\n Send the email sign-in link as before. When an end user clicks on the link,\n they will be redirected to the app if installed to finish the sign in.\n\nCustomize your mobile links\n\nYou can use a custom Firebase Hosting domain or reuse your custom\nFirebase Dynamic Links domain to be your new mobile links domain.\n\nUse a custom Firebase Hosting domain\n\n1. Follow the [Firebase Hosting guide](/docs/hosting/custom-domain) to set up a custom domain.\n2. Link the custom domain to your app associated domain.\n3. [Send an authentication link to the user's email address](/docs/auth/ios/email-link-auth#send_an_authentication_link_to_the_users_email_address) with an updated `ActionCodeSettings` object with a custom domain as `linkDomain`.\n\nRe-use your custom Firebase Dynamic Links domain\n\n1. You can re-use any of your Firebase Dynamic Links domains as your custom domain. However, any Firebase Dynamic Links functionality will no longer be supported (for example, users cannot be redirected to the app store if app isn't installed on their device).\n2. [Send an authentication link to the user's email address](/docs/auth/ios/email-link-auth#send_an_authentication_link_to_the_users_email_address) with an updated `ActionCodeSettings` object with a custom domain as `linkDomain`."]]