העברת הכניסה באמצעות קישור לאימייל מקישורים דינמיים ב-Firebase (iOS)
קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
בעבר, אימות באמצעות קישור באימייל הסתמך על Firebase Dynamic Links, שייצא משימוש ב-25 באוגוסט 2025. פרסמנו פתרון חלופי ב-Firebase Authentication iOS SDK גרסה 11.8.0 ואילך. אם האפליקציה שלך משתמשת ב-Firebase Dynamic Links, עליך להעביר את האפליקציה למערכת החדשה שמבוססת על Firebase Hosting.
העברת דומיין משויך Firebase Dynamic Links לדומיין Firebase Hosting
מעכשיו, במקום להשתמש בדומיין Firebase Dynamic Links, Firebase Authentication
תשתמש בדומיין ברירת המחדל של הפרויקט כדי ליצור
קישורים לקישורי אימייל ולפעולות אחרות של קישורים מחוץ לפס באפליקציות לנייד.Firebase Hosting המשמעות היא שצריך לעדכן את האפליקציה כדי להשתמש בדומיין ברירת המחדל הזה כדומיין המשויך לקישורי אימות אימייל לאפליקציה לנייד.
כדי לטפל בקישורים מהדומיין החדש ולהנחות את Firebase Authentication להתחיל להשתמש בדומיין Firebase Hosting כדי ליצור קישורים לאפליקציות לנייד מעכשיו והלאה, פועלים לפי ההוראות הבאות.
אם אתם רוצים להמשיך להשתמש באחד מFirebase Hostingהדומיינים המותאמים אישית
שלכם, או אפילו להגדיר את Firebase Dynamic Linksהדומיין המותאם אישית שלכם כדומיין המשויך החדש, אתם יכולים לפעול לפי ההוראות שבקטע התאמה אישית של קישורים לנייד ולהתאים את השלבים לדומיין שבו אתם רוצים להשתמש.
מקשרים את הדומיין Firebase Hosting לדומיין המשויך לאפליקציה.
תצטרכו להגדיר את הדומיין שנבחר כדומיין משויך לקישורי אפליקציות. כדי להגדיר את ההרשאה באפליקציה, פותחים את הכרטיסייה Signing & Capabilities (חתימה ויכולות) של היעד ב-Xcode ומוסיפים את הדומיינים Firebase Hosting מהשלב הקודם ליכולת Associated Domains (דומיינים משויכים). אם משתמשים בדומיין ברירת המחדל של Firebase Hosting, זה יהיה applinks:PROJECT_ID.firebaseapp.com.
קובץ של דומיין משויך נפרס בכל הדומיינים של Firebase Hosting. כדי לגשת אליו, עוברים אל PROJECT_ID.firebaseapp.com/.well-known/apple-app-site-association.
אפשר להחליף את קובץ ה-AASA. מידע נוסף זמין במאמר בנושא יצירה ואירוח של קובצי ההגדרות של הקישורים האוניברסליים.
הגדרת הפרויקט לשימוש בקישורים החדשים
כשמוכנים לטפל בקישורים החדשים לדומיין, אפשר להשתמש ב-Firebase Admin SDK כדי לעדכן את אופן יצירת הקישורים לאימייל, ולהנחות את ה-Backend שלנו להתחיל ליצור קישורים באמצעות הדומיין החדש Firebase Hosting.
constupdateRequest={mobileLinksConfig:{domain:'HOSTING_DOMAIN'}}constupdateProjectConfig=()=>{projectConfigManager.updateProjectConfig(updateRequest).then((response)=>{// updated project config}).catch((error)=>{console.log('Error updating the project:',error);});}
שולחים את הקישור באימייל ומממשים אותו.
שולחים את הקישור לכניסה באמצעות אימייל כמו קודם. כשמשתמש קצה לוחץ על הקישור,
הוא מופנה לאפליקציה אם היא מותקנת כדי לסיים את הכניסה.
התאמה אישית של קישורים בנייד
אתם יכולים להשתמש בFirebase Hostingדומיין מותאם אישית או להשתמש מחדש בדומיין המותאם אישיתFirebase Dynamic Links בתור הדומיין החדש של הקישורים לנייד.
שימוש בדומיין מותאם אישית Firebase Hosting
כדי להגדיר דומיין מותאם אישית, פועלים לפי ההוראות במדריךFirebase Hosting.
מקשרים את הדומיין המותאם אישית לדומיין המשויך לאפליקציה.
שימוש חוזר בדומיין המותאם אישית Firebase Dynamic Links
אתם יכולים להשתמש מחדש בכל אחד מהדומיינים שלכם ב-Firebase Dynamic Links בתור דומיין מותאם אישית. עם זאת, לא תהיה יותר תמיכה בפונקציונליות של Firebase Dynamic Links (לדוגמה, אי אפשר יהיה להפנות משתמשים לחנות האפליקציות אם האפליקציה לא מותקנת במכשיר שלהם).
[null,null,["עדכון אחרון: 2025-08-16 (שעון UTC)."],[],[],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 const updateRequest = {\n mobileLinksConfig: {\n domain: 'HOSTING_DOMAIN'\n }\n }\n const updateProjectConfig = () =\u003e {\n projectConfigManager.updateProjectConfig(updateRequest)\n .then((response) =\u003e {\n // updated project config\n }).catch((error) =\u003e {\n console.log('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`."]]