[英]Is there any way to authenticate the users for my google assistant app?
I am developing an app for Google assistant and I need a suggestion about the authentication of users for my app so that i can manage their data according to their unique id. 我正在为Google助手开发一个应用程序,我需要一个关于我的应用程序的用户身份验证的建议,以便我可以根据他们的唯一ID管理他们的数据。 I am using Firebase as the database and I think that authenticating the user with a Gmail account is the best way to go about it.
我使用Firebase作为数据库,我认为使用Gmail帐户验证用户是最好的方法。 So is this possible?
这可能吗? I'm also taking other suggestions.
我也在提出其他建议。
Yes - You can authenticate you users in your assistant app. 是 - 您可以在助理应用中验证用户身份。 You will need to use the OAuth 2.0 flows and follow these steps: https://developers.google.com/actions/identity/account-linking
您需要使用OAuth 2.0流程并按照以下步骤操作: https : //developers.google.com/actions/identity/account-linking
Btw, there is a good question and great answer on how to do it here: How to authenticate user with just a Google account on Actions on Google? 顺便说一下,这里有一个很好的问题和很好的答案: 如何在Google上的Google操作上使用Google帐户对用户进行身份验证?
(!) One important thing to remember is that are the moment you need to use your own OAuth server and not use providers. (!)要记住的一件重要事情是,您需要使用自己的OAuth服务器而不使用提供程序。
You have a couple of options here, depending on your needs. 根据您的需要,您可以在此处选择几种选项。
If all you want to do is track repeat visitors to your Action, then you can use the anonymous userId that is available. 如果您只想跟踪Action的重复访问者,那么您可以使用可用的匿名userId 。 This isn't really "authentication" and it certainly isn't a user identity, but if you get the same userId from a session, you know it is the same user that visited before with that userId.
这不是真正的“身份验证”,它当然不是用户身份,但如果您从会话中获得相同的userId,则您知道它与之前访问过该userId的用户相同。
If you already have accounts for your system, then going with Account Linking, as @ido-green has suggested is preferable, although significantly more complicated to setup. 如果您已经拥有系统帐户,那么使用帐户链接,因为@ ido-green建议更好,但设置要复杂得多。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.