简体   繁体   English

Dialogflow帐户链接 - 谷歌主页

[英]Dialogflow account linking - google home

I'm having slight issues using dialogflow and the SignIn helper with google home, in the simulator it works all fine with account linking including the google home simulator, but when I reset and attempt to link it again with my physical google home that I have, it's saying the following phrase everytime I hit the sign in intent: 我在使用对话框和谷歌主页的SignIn助手方面遇到了一些问题,在模拟器中它可以正常使用包括谷歌家庭模拟器在内的帐户链接,但是当我重置并尝试再次将其与我的物理谷歌主页链接时,我有,每当我点击意图时,它会说下面这句话:

"Alright, no problem. Just so you know, that means you won't be able to use your account with x. If you change your mind, you can always come back and sign in then. Sorry, can you say that again?" “好吧,没问题。就是这样,你知道,这意味着你将无法使用x账户。如果你改变主意,你可以随时回来登录。抱歉,你能再说一遍吗? “

This phrase seems to come from when you decline to sign in. 这句话似乎来自您拒绝登录时。

Does anyone have any idea how to fix this? 有谁知道如何解决这个问题? It should actually refer me to my application, on the Google Home simulator is directs me to something like this which is correct: 它实际上应该引用我的应用程序,在Google Home模拟器上指示我这样的东西是正确的:

"To get your account details, you'll need an account with x. To get you signed in, I'll just need some info. If you want more details, say "Tell me more. “要获取您的帐户详细信息,您需要一个x帐户。要让您登录,我只需要一些信息。如果您想了解更多详情,请说”告诉我更多信息。 " So, can I ask Google for your name, email address, and profile picture?" “那么,我可以向Google询问您的姓名,电子邮件地址和个人资料照片吗?”

Heres my intent code: 继承人我的意图代码:

import { dialogflow, SignIn} from 'actions-on-google';
import '@babel/polyfill';

const app = dialogflow({
    debug: true,
    clientId: process.env.client_id,
});

app.intent('StartSignIn', conv => {
    conv.ask(new SignIn('Sign in'))
});

exports.main = app

PS does anyone know how to get the sign in status, I can't seem to get it via (conv, params, signin) handler of the intent. PS有没有人知道如何获得登录状态,我似乎无法通过(conv, params, signin)处理程序获取它的意图。

Many thanks! 非常感谢!

I replicated your scenario and found a similar issue. 我复制了你的场景并发现了类似的问题。 Google Assistant went unresponsive after initiating the sign-in intent from my phone. 从我的手机启动登录意图后,Google智能助理无响应。 The simulator worked fine for phone and speaker devices. 该模拟器适用于手机和扬声器设备。 I think it might not be available yet. 我想它可能还没有。 You can give it a try with a deployed version. 您可以尝试使用已部署的版本。

Regarding the (conv, params, signin) , be sure to add the actions_intent_SIGN_IN to the intent you want to be detected when the sign-in flow finishes. 关于(conv, params, signin) ,请确保在登录流程完成时将actions_intent_SIGN_IN 添加到您想要检测的意图。

After that, you can access the status, like this: 之后,您可以访问状态,如下所示:

app.intent('signInConfirm', (conv, params, signin) => {
  conv.close(`Sign in status: ${signin.status}`);
});

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

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