계정 연결

모든 Cloud-to-cloud 통합에는 사용자를 인증하는 메커니즘이 포함되어야 합니다.

인증을 사용하면 사용자의 Google 계정을 인증 시스템의 사용자 계정과 연결할 수 있습니다. 이를 통해 이행이 스마트 홈 인텐트를 수신할 때 사용자를 식별할 수 있습니다. Google 스마트 홈은 승인 코드 흐름이 있는 OAuth만 지원합니다.

OAuth 2.0을 구현한 후에는 선택적으로 OAuth 기반 App Flip를 구성할 수 있습니다. 이를 통해 사용자는 인증 시스템의 계정을 Google 계정에 더 빠르게 연결할 수 있습니다.

OAuth

smart home의 경우 승인 코드 흐름이 있는 OAuth를 사용해야 하며, 이 경우 승인토큰 교환 엔드포인트 두 개가 필요합니다.

사용자를 인증하면 smart home 인텐트가 이행에 전송될 때 사용자의 서드 파티 OAuth 2.0 액세스 토큰이 승인 헤더에 전송됩니다. 모든 사용자는 계정 연결을 실행해야 합니다. 기기 정보가 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를 참고하세요.