खाता लिंक करना

हर Cloud-to-cloud इंटिग्रेशन में, उपयोगकर्ताओं की पुष्टि करने का तरीका शामिल होना चाहिए.

पुष्टि करने की सुविधा की मदद से, अपने उपयोगकर्ताओं के Google खातों को पुष्टि करने वाले सिस्टम में मौजूद उपयोगकर्ता खातों से लिंक किया जा सकता है. इससे आपको अपने उपयोगकर्ताओं की पहचान करने में मदद मिलती है. ऐसा तब होता है, जब स्मार्ट होम इंटेंट को पूरा करने का अनुरोध मिलता है. Google स्मार्ट होम, सिर्फ़ ऑथराइज़ेशन कोड फ़्लो वाले OAuth के साथ काम करता है.

OAuth 2.0 लागू करने के बाद, आपके पास OAuth पर आधारित App Flip को कॉन्फ़िगर करने का विकल्प होता है. इससे आपके उपयोगकर्ताओं को, पुष्टि करने वाले सिस्टम में मौजूद अपने खातों को Google खातों से तेज़ी से लिंक करने की सुविधा मिलती है.

OAuth

smart home के लिए, आपको ऑथराइज़ेशन कोड फ़्लो के साथ OAuth का इस्तेमाल करना होगा. इसके लिए, आपके पास दो एंडपॉइंट होने चाहिए: ऑथराइज़ेशन और टोकन एक्सचेंज एंडपॉइंट.

किसी उपयोगकर्ता की पुष्टि करने के बाद, उपयोगकर्ता के तीसरे पक्ष के OAuth 2.0 ऐक्सेस टोकन को अनुमति देने वाले हेडर में भेजा जाता है. ऐसा तब होता है, जब smart home इंटेंट को आपके फ़ुलफ़िलमेंट पर भेजा जाता है. सभी उपयोगकर्ताओं को खाता लिंक करना होगा, क्योंकि डिवाइस की जानकारी action.devices.SYNC इंटेंट के साथ Google Assistant को भेजी जाती है. इसके लिए, खाता लिंक करना ज़रूरी है.

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 को कॉन्फ़िगर करने के तरीके से जुड़े निर्देशों के लिए, OAuth पर आधारित App Flip देखें.