Google 关联缺失用户信息的 Smarthome Action 帐户

Google Smarthome Action account linking missing user information

我的代码基于这个例子
https://codelabs.developers.google.com/codelabs/smarthome-washer

OAuth 进程正在运行。但是现在我想知道谁是用户。

这里
https://developers.google.com/assistant/identity/google-sign-in-oauth?oauth=code
被描述为:
在用户同意您的 Action 访问他们的 Google 个人资料后,Google 发送一个请求,其中包含 Google 用户身份的签名断言。

但如果我测试身份验证,我将永远不会被要求授予对我的 Google 个人资料的访问权限。

我认为我必须配置我的应用程序希望从用户那里获得哪些信息。但我不知道在哪里做。

我搜索了很多,但找不到真正解释如何获取用户信息的示例。

感谢您的帮助。
问候西蒙

The OAuth process is working. But now I want to know who is the user.

请注意,示例和代码实验室使用伪造的 OAuth 实现,未实现用户登录流程,并且 returns 在帐户链接期间 hard-coded fake access token

Here https://developers.google.com/assistant/identity/google-sign-in-oauth?oauth=code is described that: After the user gives your Action consent to access their Google profile, Google sends a request that contains a signed assertion of the Google user's identity.

智能家居操作不支持 Google 登录帐户链接流程。您需要在您的帐户链接集成中实施 OAuth authorization code 流程。

I think that I have to configure which information my app wants to have from the user. But I didn't know where to do that.

I searched a lot but I couldn't find an example which really explains how to get the user information.

这基本上与帐户链接所完成的相反。目标不是将 Google 中的用户信息提供给你的 Action。相反,帐户链接用于通过向 Google 提供您的服务认为对云服务中的特定用户有效的访问令牌来授权 Google 访问您用户的设备。

所以在这种情况下,您就是拥有用户数据的人。您只是提供 Google 范围内的数据访问权限,以便向设备发送查询和命令。