OAuth ベースのアプリ切り替え(アプリ切り替え)を使用すると、ユーザーは、認証システム内のユーザーのアカウントを各自の Google アカウントに簡単かつ迅速にリンクできます。ユーザーのスマートフォンに対象のアプリがインストールされている場合、ユーザーがアカウント リンク処理を開始すると、そのアプリにシームレスに切り替わってユーザーの承認が取得されます。
このアプローチでは、ユーザーが認証のためにユーザー名とパスワードを再入力する必要がないため、リンク処理がより迅速かつ簡単になります。代わりに、アプリ切り替えはアプリ上のユーザー アカウントの認証情報を利用します。ユーザーが Google アカウントをアプリにリンクすると、デベロッパーが開発した統合機能を利用できるようになります。
[[["わかりやすい","easyToUnderstand","thumb-up"],["問題の解決に役立った","solvedMyProblem","thumb-up"],["その他","otherUp","thumb-up"]],[["必要な情報がない","missingTheInformationINeed","thumb-down"],["複雑すぎる / 手順が多すぎる","tooComplicatedTooManySteps","thumb-down"],["最新ではない","outOfDate","thumb-down"],["翻訳に関する問題","translationIssue","thumb-down"],["サンプル / コードに問題がある","samplesCodeIssue","thumb-down"],["その他","otherDown","thumb-down"]],["最終更新日 2025-07-25 UTC。"],[[["\u003cp\u003eOAuth-based App Flip Linking simplifies account linking by allowing users to connect their existing app accounts to their Google accounts, streamlining the process and eliminating the need for re-entering credentials.\u003c/p\u003e\n"],["\u003cp\u003eApp Flip requires an Android or iOS app and a managed OAuth 2.0 server that supports the authorization code flow, ensuring secure and authorized access.\u003c/p\u003e\n"],["\u003cp\u003eDesign guidelines for the App Flip consent screen emphasize clear communication, data transparency, user control, and branding, promoting a user-friendly experience.\u003c/p\u003e\n"],["\u003cp\u003eImplementing App Flip involves modifying user authorization code to accept deep links from Google, and detailed guides are available for both Android and iOS app integration.\u003c/p\u003e\n"],["\u003cp\u003eApp Flip can be tested using sample apps and tools before production, allowing developers to simulate the flow and verify functionality; production testing involves using a registered Google Account and verifying linked account states.\u003c/p\u003e\n"]]],[],null,["# Google Account Linking with OAuth-based App Flip\n\nOAuth-based App Flip Linking (App Flip) allows your users to easily and quickly\nlink their accounts in your authentication system to their Google accounts.\nIf your app is installed on your user's phone when they initiate the account\nlinking process, they are seamlessly flipped to your app to obtain user\nauthorization.\n\nThis approach provides a faster and easier linking process since the user does\nnot have to re-enter their username and password to authenticate; instead,\nApp Flip leverages the credentials from the user's account on your app. Once a\nuser has linked their Google account with your app, they can take advantage of\nany integrations that you have developed.\n\nYou can set up App Flip for both iOS and Android apps.\n**Figure 1.** Account linking on a user's phone with App Flip.\n\nRequirements\n------------\n\nTo implement App Flip, you must fulfill the following requirements:\n\n- You must have an Android or iOS app.\n- You must own, manage and maintain an OAuth 2.0 server which supports the OAuth 2.0 authorization code flow.\n\n| **Note:** Confirm that your OAuth2 implementation or provider supports the authorization code flow along with App Flip redirect URLs and client_ids as described in our guides.\n\nDesign guidelines\n-----------------\n\nThis section describes the design requirements and recommendations for the App\nFlip account linking consent screen. After Google calls your app, your app\ndisplays the consent screen to the user.\n\n### Requirements\n\n1. 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.\n\n### Recommendations\n\nWe recommend that you do the following:\n\n1. **Display Google's Privacy Policy.** Include a link to\n [Google's Privacy Policy](http://policies.google.com)\n on the consent screen.\n\n2. **Data to be shared.** Use clear and concise language to tell the user what\n data of theirs Google requires and why.\n\n3. **Clear call-to-action.** State a clear call-to-action on your consent\n screen, such as \"Agree and link.\" This is because users need to\n understand what data they're required to share with Google to link their\n accounts.\n\n4. **Ability to cancel.** Provide a way for users to go back or cancel, if\n they choose not to link.\n\n5. **Ability to unlink.** Offer a mechanism for users to unlink, such as a\n URL to their account settings on your platform. Alternatively, you can\n include a link to [Google Account](https://myaccount.google.com) where users\n can manage their linked account.\n\n6. **Ability to change user account.** Suggest a method for users to switch\n their account(s). This is especially beneficial if users tend to have\n multiple accounts.\n\n - 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.\n7. **Include your logo.** Display your company logo on the consent screen.\n Use your style guidelines to place your logo. If you wish\n to also display Google's logo, see\n [Logos and trademarks](https://www.google.com/permissions/logos-trademarks/).\n\n**Figure 2.** Account linking consent screen design guidelines.\n\nImplement App Flip in your native apps\n--------------------------------------\n\nTo implement App Flip, you need to modify the user authorization code in your\napp to accept a deep link from Google.\n\nTo support App Flip on your Android app, follow the instructions on the\n[Android implementation guide](/identity/account-linking/app-flip-android).\n\nTo support App Flip on your iOS app, follow the instructions on the [iOS\nimplementation guide](/identity/account-linking/app-flip-ios).\n\nTest App Flip\n-------------\n\nApp Flip may be simulated using sample and test apps before verified production\napps and a working OAuth 2.0 server are available.\n\nDuring App Flip a Google app will first open your app which then requests an\nauthorization code response from your OAuth 2.0 server, in the final step the\nresponse is returned to the Google app.\n\n### Prerequisites\n\nTo simulate a Google app and trigger the intent which launches your app,\ndownload and install the App Flip Test Tool for\n[Android](https://github.com/googlesamples/identity-appflip-tester-android)\nand\n[iOS](https://github.com/googlesamples/identity-appflip-tester-ios).\n\nDownload and install the App Flip Sample for\n[Android](https://github.com/googlesamples/identity-appflip-android)\nand\n[iOS](https://github.com/googlesamples/identity-appflip-ios)\nTo simulate your app and select an OAuth 2.0 response type.\n\n### Test sequence\n\n1. Open the App Flip Test Tool.\n2. Press `Try Flip!` to launch your App Flip Sample app.\n3. Select a response from the radio buttons in the Sample app.\n4. Press `Send` to return a simulated OAuth 2.0 response back to the Test Tool.\n5. Check the Test Tool log messages for an auth_code or error details.\n\n### Production testing\n\nApp Flip may be tested in production after completing\n[registration](/identity/account-linking/registration) and your OAuth 2.0\nserver implementation.\n\nA single Google Account and a\n[task specific email address](https://support.google.com/a/users/answer/9308648)\nare recommended for automated testing.\n\nAccounts linking state can be viewed using\n[Linked accounts](https://myaccount.google.com/accountlinking) when signed in\nas the Google Account holder.\nAccounts may be unlinked between repeated tests from here as well.\n\nOptionally, you may choose to implement [RISC](/identity/account-linking/unlinking#cross-account_protection_risc)\nto programmatically unlink and notify Google of the change."]]