קישור חשבונות

כל שילוב של Cloud-to-cloud חייב לכלול מנגנון לאימות משתמשים.

אימות מאפשר לכם לקשר בין חשבונות Google של המשתמשים לבין חשבונות משתמשים במערכת האימות שלכם. כך תוכלו לזהות את המשתמשים שלכם כשמתקבלת כוונה לבית חכם ב-fulfillment. הפתרון של Google לבית חכם תומך רק ב-OAuth עם תהליך קוד אימות.

אחרי שמטמיעים OAuth 2.0, אפשר להגדיר App Flip שמבוסס על OAuth, כדי לאפשר למשתמשים לקשר מהר יותר את החשבונות שלהם במערכת האימות שלכם לחשבונות Google שלהם.

OAuth

במקרה של smart home, צריך להשתמש ב-OAuth עם תהליך קוד הרשאה, שדורש שתי נקודות קצה: נקודת הקצה של ההרשאה ונקודת הקצה של החלפת האסימון.

אחרי שמשתמש מאומת, טוקן הגישה שלו ב-OAuth 2.0 מצד שלישי נשלח בכותרת ההרשאה כשמתבצעות כוונות של smart home אל מרכז הבקרה. כל המשתמשים צריכים לקשר את החשבון שלהם, כי פרטי המכשיר נשלחים אל Google Assistant עם כוונת action.devices.SYNC, שדורשת קישור חשבון.

השילוב של Cloud-to-cloud אמור לתמוך בכמה משתמשי Google שמתחברים לאותו חשבון משתמש (לדוגמה, כשמשתמשים מעניקים גישה למשתמשים אחרים במשק הבית שלהם). אם השירות שלכם לא תומך בחיבורים של כמה משתמשים, הוא צריך לספק שגיאות בזמן קישור החשבון.

הוראות להגדרת שרת OAuth 2.0 לשילוב זמינות במאמר הטמעה של שרת OAuth 2.0.

קישור אפליקציות מבוסס-OAuth

OAuth-based App Flip Linking (App Flip) allows your users to easily and quickly link their accounts in your authentication system to their Google accounts. If your app is installed on your user’s phone when they initiate the account linking process, they are seamlessly flipped to your app to obtain user authorization.

This approach provides a faster and easier linking process since the user does not have to re-enter their username and password to authenticate; instead, App Flip leverages the credentials from the user's account on your app. Once a user has linked their Google account with your app, they can take advantage of any integrations that you have developed.

You can set up App Flip for both iOS and Android apps.

This figure shows the steps for a user to link their Google account
            to your authentication system. The first screenshot shows how a user
            can select your app if their Google account is linked to your app.
            The second screenshot shows the confirmation for linking their
            Google account with your app. The third screenshot shows a
            successfully linked user account in the Google app.
Figure 1. Account linking on a user's phone with App Flip.

Requirements

To implement App Flip, you must fulfill the following requirements:

  • You must have an Android or iOS app.
  • You must own, manage and maintain an OAuth 2.0 server which supports the OAuth 2.0 authorization code flow.

מידע נוסף על תהליך קבלת קוד הרשאה לקישור OAuth זמין במאמר הטמעה של שרת OAuth 2.0.

הוראות להגדרת App Flip לשילוב מופיעות במאמר App Flip מבוסס OAuth.