简体   繁体   English

如何将现有 Firebase Auth 与 Google Actions 关联起来

[英]How to Account Link existing Firebase Auth with Google Actions

I have a mobile app that has data & auth on Firebase.我有一个移动应用程序,它在 Firebase 上有数据和身份验证。 I want to create a Google Action for these same users.我想为这些相同的用户创建一个 Google Action。

This post asked basically the same question and the top reply says "However, you can use Firebase Auth if you're willing to setup your own OAuth2 server. If you set one up you can have them login using Firebase Sign-In, generate the token and store it against their Firebase ID, and issue that token to the Assistant client. When you get that token back, you can easily associate it back to the Firebase ID." 这篇文章问了基本相同的问题,顶部回复说“但是,如果您愿意设置自己的 OAuth2 服务器,您可以使用 Firebase 身份验证。如果您设置了一个,您可以让他们使用 Firebase 登录,生成“

Does anybody have an example or a more in depth guideline of how to accomplish this?有没有人有一个例子或更深入的指南来说明如何做到这一点?

That post you linked is quite old and AoG is changing fairly rapidly.您链接的那篇文章已经很老了,而且 AoG 的变化很快。 Case-in-point, they released their new "conversational actions" just last month (2020-06), and with these it is quite easy to use Google accounts and firebase auth.举个例子,他们就在上个月(2020-06)发布了新的“对话操作”,有了这些,使用 Google 帐户和 firebase auth 非常容易。

The docs for thisare here BUT don't use the code provided in the docs - I found it to be quite broken as of 2020-07 - use the sample actions on their github instead.文档在这里但不要使用文档中提供的代码 - 我发现它在 2020 年 7 月已经完全损坏 - 请改用 github 上的示例操作。

This gives the user an easy way to connect their google account to your action with just their voice resulting in a Firebase authentication.这为用户提供了一种简单的方法,只需他们的声音即可将他们的谷歌帐户连接到您的操作,从而获得 Firebase 身份验证。

Now the part I'm not sure about is, if your action and your app use use the same GCP/Firebase project and the same client ID, will they produce the same 'user uid' in firebase auth.现在我不确定的部分是,如果您的操作和您的应用使用相同的 GCP/Firebase 项目和相同的客户端 ID,它们是否会在 firebase 身份验证中生成相同的“用户 uid”。 Probably not, but if so you would be done and the whole thing would be very easy.可能不会,但如果是这样,你就会完成,整个事情会很容易。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 链接多种语言的 Google Actions 和 Auth0 帐户 - Google Actions & Auth0 account linking multiple languages 如何使用Firebase Auth(非Google帐户)使Google Cloud Endpoints能够用于经过身份验证的呼叫? - How can I get Google Cloud Endpoints to work for authenticated calls with Firebase Auth (non-Google Account)? Google上的操作 - 如何撤销帐户关联? - Actions on Google - How to revoke account linking? Firebase google auth 自动选择用户。 如何强制它选择帐户 - Firebase google auth automatically selecting user. How to force it to select account 帐户与Google上的操作相关联 - Account linking with actions on google 如何将google帐户链接到本地​​帐户以进行google oauth2登录 - How to link google account to local account for google oauth2 login 成功验证代码和访问令牌后,Google Actions 的帐户链接失败 - Account linking is failing for Google Actions after successful auth code and access token 如何将电子邮件和密码登录方法添加到在我的 firebase 项目中使用第三方提供商(例如 google/facebook)创建的现有帐户 - How to add email&password login method to existing account that was created with a third party provider such as google/facebook on my firebase project 谷歌上的行动,Oauth帐户链接 - actions on google, Oauth account Linking 如何使用谷歌 API 获取服务帐户的身份验证令牌? - How to fetch auth token for service account using google API?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM