Every smart home Action must include a mechanism for authenticating users.
Authentication allows you to link your users' Google accounts with user accounts in your authentication system. This allows you to identify your users when your fulfillment receives a smart home intent. Google smart home only supports OAuth with an authorization code flow.
Once you have an OAuth 2.0 implementation, you can optionally configure OAuth-based App Flip, which allows your users to more quickly link their accounts in your authentication system to their Google accounts.
For smart home, you must use OAuth with an authorization code flow, which requires you to have two endpoints: the authorization and token exchange endpoints.
When you have authenticated a user, the user's third-party OAuth 2.0 access token
is sent in the authorization header when smart home intents are sent to your
fulfillment. All users have to perform account linking, because device
information is sent to the Assistant with the
intent, which requires account linking.
Your smart home Action is expected to support multiple Google users connecting to the same user account (for example, when users give access to other users in their household). If your service can't support multiple user connections, it should provide errors at account linking time.
For instructions on how to set up an OAuth 2.0 server for your Action, see Implement your OAuth 2.0 server.
OAuth-based App Flip
For more information on the OAuth linking authorization code flow, see Implement your OAuth 2.0 server.
For instructions on how to configure App Flip for your Action, see OAuth-based App Flip.