بعد إعداد OAuth 2.0، يمكنك اختياريًا ضبط App Flip المستند إلى OAuth، ما يتيح لمستخدمي Android ربط حساباتهم في نظام المصادقة الخاص بك بحساباتهم على Google بشكل أسرع. توضّح الأقسام التالية كيفية تصميم وتنفيذ App Flip لعملية الدمج مع Cloud-to-cloud.
Design guidelines
This section describes the design requirements and recommendations for the App Flip account linking consent screen. After Google calls your app, your app displays the consent screen to the user.
Requirements
- You must have a Google authorization statement such as "Once linked, Google will have permission to control your devices."
- You must communicate that the user's account is being linked to Google, not to a specific Google product, such as Google Home or Google Assistant.
- You must state a clear call-to-action on your consent screen and use the wording "Agree and link" for linking action. This is because users need to understand what data they're required to share with Google to link their accounts.
- You must provide a way for users to go back or cancel, if they choose not to link. Use the wording "Cancel" for the cancel action.
- You must implement this workflow: After clicking "Agree and link", you must show linking success and redirect the user back to the Google Home app automatically. The user should now see the linked device on the Google Home app with your action. After clicking "Cancel" you should redirect the user back to the Google Home app.
Recommendations
We recommend that you do the following:
Display Google's Privacy Policy. Include a link to Google's Privacy Policy on the consent screen.
Data to be shared. Use clear and concise language to tell the user what data of theirs Google requires and why.
Ability to unlink. Offer a mechanism for users to unlink, such as a URL to their account settings on your platform. Alternatively, you can include a link to Google Account where users can manage their linked account.
Ability to change user account. Suggest a method for users to switch their account(s). This is especially beneficial if users tend to have multiple accounts.
- If a user must close the consent screen to switch accounts, send a recoverable error to Google so the user can sign in to the desired account with OAuth linking and the implicit flow.
Include your logo. Display your company logo on the consent screen. Use your style guidelines to place your logo. If you wish to also display Google's logo, see Logos and trademarks.

إعداد App Flip المستند إلى بروتوكول OAuth
توضّح الأقسام التالية المتطلبات الأساسية لاستخدام ميزة "تبديل التطبيقات" المستندة إلى OAuth وكيفية ضبط مشروع "تبديل التطبيقات" في Google Home Developer Console.
إنشاء عملية دمج من السحابة الإلكترونية إلى السحابة الإلكترونية وإعداد خادم OAuth 2.0
قبل أن تتمكّن من إعداد App Flip، عليك إجراء ما يلي:
- إعداد خادم OAuth 2.0 لمزيد من المعلومات حول إعداد خادم OAuth، يُرجى الاطّلاع على تنفيذ خادم OAuth 2.0.
- إنشاء عملية تكامل بين الخدمات المستندة إلى السحابة الإلكترونية لإنشاء عملية دمج، اتّبِع التعليمات الواردة في إنشاء عملية دمج من السحابة الإلكترونية إلى السحابة الإلكترونية.
ضبط ميزة "تبديل التطبيقات" في Play Console
يوضّح القسم التالي كيفية ضبط ميزة "تبديل التطبيقات" في Developer Console.
- املأ جميع الحقول ضمن معلومات عميل OAuth. (في حال عدم توفّر App Flip، يتم استخدام بروتوكول OAuth العادي كخطة بديلة).
- ضِع علامة في المربّع بجانب تفعيل على أجهزة iOS ضمن استخدام تطبيقك لربط الحساب(اختياري).
- املأ حقل الرابط العام. لمزيد من المعلومات حول الروابط العامة، يُرجى الاطّلاع على مقالة السماح للتطبيقات والمواقع الإلكترونية بالربط بمحتواك.
- إذا أردت ضبط عميلك بشكل اختياري، أضِف نطاقات وانقر على إضافة نطاق ضمن ضبط عميلك (اختياري).
- انقر على حفظ.
يمكنك الآن الانتقال إلى القسم التالي لتنفيذ App Flip في تطبيقك على iOS أو Android.
تنفيذ App Flip في تطبيقاتك الأصلية
لتنفيذ App Flip، عليك تعديل رمز تفويض المستخدم في تطبيقك لقبول رابط لصفحة في التطبيق من Google.
اختبار App Flip على جهازك
بعد إنشاء عملية ربط بين الخدمات المستندة إلى السحابة الإلكترونية وإعداد ميزة App Flip على وحدة التحكّم وفي تطبيقك، يمكنك اختبار ميزة App Flip على جهازك الجوّال. يمكنك استخدام تطبيق Google Home لاختبار ميزة "التبديل السريع بين التطبيقات".
لاختبار App Flip من تطبيق Google Home، اتّبِع الخطوات التالية:
- انتقِل إلى Developer Console واختَر مشروعك.
- انتقِل إلى النقل من السحابة الإلكترونية إلى السحابة الإلكترونية > اختبار.
- بدء عملية ربط الحساب من تطبيق Home:
- افتح Google Home app (GHA).
- انقر على الزر +.
- انقر على إعداد جهاز.
- انقر على هل لديك أجهزة سبق وتمّ إعدادها؟
- اختَر عملية الدمج من السحابة الإلكترونية إلى السحابة الإلكترونية من قائمة مقدّمي الخدمات. سيتم وضع البادئة "[اختبار]" قبل اسم التطبيق في القائمة. عند اختيار عملية الدمج [الاختبارية] من القائمة، من المفترض أن يفتح التطبيق.
- تأكَّد من إطلاق تطبيقك وابدأ في اختبار مسار التفويض.