Dialogflow 帐户链接 - google 主页

Dialogflow account linking - google home

我在 google home 中使用 dialogflow 和 SignIn helper 时遇到一些小问题,在模拟器中它可以正常使用帐户 linking 包括 google home 模拟器,但是当我重置并尝试使用我的物理 google 家再次 link 它时,每次我点击登录意图时它都会说以下短语:

"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?"

这句话似乎是在您拒绝登录时产生的。

有人知道如何解决这个问题吗?它实际上应该将我引向我的应用程序,在 Google 家庭模拟器上是将我引向这样正确的东西:

"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. " So, can I ask Google for your name, email address, and profile picture?"

这是我的意图代码:

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

P.S 有谁知道如何获取登录状态,我似乎无法通过 (conv, params, signin) 意图处理程序获取它。

非常感谢!

我复制了您的场景并发现了类似的问题。 Google 从我的 phone 启动登录意图后,助手没有响应。该模拟器适用于 phone 和扬声器设备。我认为它可能还不可用。您可以尝试使用已部署的版本。

关于(conv, params, signin),请务必add the actions_intent_SIGN_IN您想要在登录流程完成时被检测到的意图。

之后,您可以访问状态,如下所示:

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