ऐप्लिकेशन फ़्लिप

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

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

  1. You must have a Google authorization statement such as "Once linked, Google will have permission to control your devices."
  2. 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.
  3. 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.
  4. 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.
  5. 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:

  1. Display Google's Privacy Policy. Include a link to Google's Privacy Policy on the consent screen.

  2. Data to be shared. Use clear and concise language to tell the user what data of theirs Google requires and why.

  3. 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.

  4. 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.
  5. 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.

This figure shows an example consent screen with call-outs to the
            individual requirements and recommendations to be followed when
            you design a user consent screen.
Figure 1: Account linking consent screen design guidelines.

OAuth-आधारित App Flip के लिए सेट अप करें

नीचे दिए गए सेक्शन में, OAuth पर आधारित App Flip प्रोजेक्ट से जुड़ी ज़रूरी शर्तों के बारे में बताया गया है. साथ ही, Actions कंसोल में अपने App Flip प्रोजेक्ट को कॉन्फ़िगर करने का तरीका भी बताया गया है.

स्मार्ट होम ऐक्शन बनाएं और OAuth 2.0 सर्वर सेट अप करें

App Flip को कॉन्फ़िगर करने से पहले, आपको ये काम करने होंगे:

Actions कंसोल में App Flip को कॉन्फ़िगर करें

इस सेक्शन में, Actions कंसोल में App Flip को कॉन्फ़िगर करने का तरीका बताया गया है.

  1. OAuth क्लाइंट की जानकारी में दिए गए सभी फ़ील्ड भरें. (अगर App Flip काम नहीं करता, तो फ़ॉलबैक के तौर पर सामान्य OAuth का इस्तेमाल किया जाता है.)
  2. खाता जोड़ने के लिए अपने ऐप्लिकेशन का इस्तेमाल करें(ज़रूरी नहीं) में जाकर, iOS के लिए चालू करें को चुनें.
  3. यूनिवर्सल लिंक फ़ील्ड भरें. यूनिवर्सल लिंक के बारे में ज़्यादा जानने के लिए, ऐप्लिकेशन और वेबसाइटों को अपने कॉन्टेंट से लिंक करने की अनुमति देना देखें.
  4. अगर आपको वैकल्पिक रूप से अपने क्लाइंट को कॉन्फ़िगर करना है, तो दायरे जोड़ें और अपना क्लाइंट कॉन्फ़िगर करें (ज़रूरी नहीं) में जाकर दायरा जोड़ें पर क्लिक करें.
  5. सेव करें पर क्लिक करें.

अब आपके पास अगले सेक्शन पर जाकर, iOS या Android ऐप्लिकेशन में App Flip को लागू करने का विकल्प है.

अपने नेटिव ऐप्लिकेशन में App Flip लागू करें

App Flip को लागू करने के लिए, आपको अपने ऐप्लिकेशन में उपयोगकर्ता के ऑथराइज़ेशन कोड में बदलाव करना होगा, ताकि Google से डीप लिंक स्वीकार किया जा सके.

अपने डिवाइस पर App Flip को टेस्ट करें

अब आपने कंसोल पर और ऐप्लिकेशन में App Flip को कॉन्फ़िगर कर लिया है और कार्रवाई कर ली है, तो मोबाइल डिवाइस पर App Flip को टेस्ट किया जा सकता है. App Flip को टेस्ट करने के लिए, Google Assistant app या Google Home app (GHA) का इस्तेमाल किया जा सकता है.

Google Assistant app से App Flip की जांच करने के लिए, यह तरीका अपनाएं:

  1. Actions कंसोल पर जाएं और अपना प्रोजेक्ट चुनें.
  2. सबसे ऊपर मौजूद नेविगेशन पैनल में, जांच करें पर क्लिक करें.
  3. Google Assistant ऐप्लिकेशन से खाता लिंक करने के फ़्लो को ट्रिगर करें:
    1. Google Assistant app खोलें.
    2. सेटिंग पर क्लिक करें.
    3. Assistant टैब में, होम कंट्रोल पर क्लिक करें.
    4. जोड़ें(+) पर क्लिक करें.
    5. सेवा देने वालों की सूची में से अपनी सेट की गई कार्रवाई चुनें. इससे सूची में “[test]” से पहले “[test]” जुड़ा होगा. सूची में से अपनी [test] कार्रवाई चुनने पर इससे आपका ऐप्लिकेशन खुल जाएगा.
    6. पुष्टि करें कि आपका ऐप्लिकेशन लॉन्च कर दिया गया था और अपने अनुमति देने के फ़्लो की जांच करना शुरू करें.

Google Home ऐप्लिकेशन से App Flip को टेस्ट करने के लिए, यह तरीका अपनाएं:

  1. Actions कंसोल पर जाएं और अपना प्रोजेक्ट चुनें.
  2. सबसे ऊपर मौजूद नेविगेशन पैनल में, जांच करें पर क्लिक करें.
  3. Home ऐप्लिकेशन से खाता लिंक करने के फ़्लो को ट्रिगर करें:
    1. Google Home app (GHA) खोलें.
    2. + बटन पर क्लिक करें.
    3. डिवाइस सेट अप करें पर क्लिक करें.
    4. क्या पहले से कुछ सेट अप किया हुआ है? पर क्लिक करें
    5. सेवा देने वालों की सूची में से अपनी smart home कार्रवाई चुनें. इससे सूची में “[test]” से पहले “[test]” जुड़ा होगा. सूची में से अपनी [test] कार्रवाई चुनने पर इससे आपका ऐप्लिकेशन खुल जाएगा.
    6. पुष्टि करें कि आपका ऐप्लिकेशन लॉन्च कर दिया गया था और अपने अनुमति देने के फ़्लो की जांच करना शुरू करें.