简体   繁体   English

如何为用户创建Dialogflow登录?

[英]How to create Dialogflow login for users?

How would I go about making a user login / acocunt making for a Dialogflow agent that would consist of a username and password and then store it on firebase / firestore? 我该如何进行用户登录/自动登录以创建一个由用户名和密码组成的Dialogflow代理,然后将其存储在firebase / firestore中?

I'm making an app that will require users to login, but the app depends almost entirely on the Dialgflow agent and considering most things on Dialogflow are fairly easy, i figured this might be easier. 我正在制作一个需要用户登录的应用程序,但是该应用程序几乎完全取决于Dialgflow代理,并且考虑到Dialogflow上的大多数功能都相当简单,我认为这可能会更容易。

From what I've read, there is a way of doing this through the actions on google console, however I was hoping to use a webhook / the inline editor to make a function. 据我所读,有一种方法可以通过Google控制台上的操作来完成此操作,但是我希望使用webhook /内联编辑器来实现功能。 I would provide a code sample of what I have tried, but truthfully I'm not even really sure where to start. 我将提供我尝试过的代码示例,但实际上我什至不十分确定从哪里开始。

With your answer, if you could maybe provide a general code snippet I could probably build off of that. 有了您的答案,如果您可以提供一个通用的代码片段,我可能可以以此为基础。

Thank you for your help or any suggestions! 感谢您的帮助或任何建议!

Note : If ultimately the actions of google route is a lot easier and better, I will go that route, I just do not want to have the dependency of the google assistant. 注意 :如果最终Google路线的操作要容易得多和更好,我会选择该路线,只是不想拥有google助手的依赖关系。

Account linking is handled by Actions On Google, instead of in Dialogflow (though you'll still have to handle the fulfillment on your end). 帐户关联是由Google上的Actions处理的,而不是由Dialogflow处理的(尽管您仍然必须处理最终的实现)。 Dialogflow -itself- doesn't have the capability of doing any user-login flow, but can assist AoG in doing so. Dialogflow(本身)不具有执行任何用户登录流程的能力,但可以协助AoG这样做。

Authentication comes in 3 flavors; 身份验证有3种样式: the easiest being "Google Sign-in", which just requests a user to log in with their Google Account. 最简单的是“ Google登录”,它仅要求用户使用其Google帐户登录。 More info here . 更多信息在这里 The example covers your question pretty closely, and should even work using the inline-editor. 该示例非常接近地涵盖了您的问题,甚至应该使用内联编辑器工作。

You could write your own OAuth service (which would somewhat allow you to store user credentials in firestore), but it is definitely going to be more work. 您可以编写自己的OAuth服务(可以在某种程度上允许您将用户凭据存储在firestore中),但是肯定会做更多工作。 More info on the AoG details here 有关AoG详细信息的更多信息,请点击此处

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM