简体   繁体   English

Google助手,将安装的应用程序与没有OAuth2的助手连接

[英]Google Assistant, connecting installed app with the assistant without OAuth2

Can you login user through your app without OAuth2 Server? 您可以在不使用OAuth2服务器的情况下通过您的应用登录用户吗?

We currently use JSON Web Tokens. 我们目前使用JSON Web令牌。

Scenario: 场景:

  • User is already logged in the app. 用户已登录该应用程序。
  • Then he says "OK Google, openMyApp" 然后他说:“好的,Google,openMyApp”
  • Then the bot asks him what does he want? 然后,机器人问他想要什么?
  • User says: "Reserve me closest car" 用户说:“为我保留最近的汽车”
  • Because user is logged in the app, all it needs is Access Token from the app that is saved for example sharedPreferences. 因为用户已登录应用程序,所以它所需要的只是来自应用程序的访问令牌,该令牌已保存,例如sharedPreferences。
  • Car gets reserved 汽车被保留

This is the part that i don't know how to do. 这是我不知道该怎么做的部分。 I read the documentation that the OAuth2 is needed for linking accounts. 我阅读了有关链接帐户需要OAuth2的文档。 All we would need is the token, from the app then we know if he is logged in or not and because this is the service outside of Google, we would need a premium plan (pay as you go), to access our server. 我们需要的只是从应用程序获得的令牌,然后我们才能知道他是否已登录,并且由于这是Google之外的服务,因此我们需要高级计划(即用即付)来访问我们的服务器。 Thanks for the help. 谢谢您的帮助。

Any thoughts? 有什么想法吗?

No, there is no protocol for communicating between an action and an Android app for authentication. 不可以,在动作和Android应用之间没有用于身份验证的通讯协议。 You may want to look at features like App Actions which will enable a closer connection between a local application and an action, or Google Sign-In which will provide a simpler authentication system. 您可能需要查看诸如App Actions这样的功能,这些功能可以在本地应用程序和操作之间建立更紧密的连接,或者可以使用Google Sign-In提供更简单的身份验证系统。

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

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