[英]Actions on google account linking returns error
My Dialogflow agent is integrated with Google Assistant, I am trying to extend it with Actions on Google.我的 Dialogflow 代理与 Google Assistant 集成,我正在尝试使用 Actions on Google 扩展它。 Now we are trying Account linking with our client's Oauth server.
现在我们正在尝试将 Account 链接到我们客户端的 Oauth 服务器。 Auth URL, Redirect URI, Client secret, and Client Id are provided by them and the same is configured in the account linking section of my project in Actions Console with authorization code flow .
Auth URL、Redirect URI、Client secret 和 Client Id 由他们提供,并且在 Actions Console 中我的项目的帐户链接部分中配置了相同的授权代码流。 Using the same details, I was able to implement the account linking to my Alexa Skill.
使用相同的细节,我能够实现链接到我的 Alexa 技能的帐户。 I am using Node.js as my webhook, the same is using actions-on-google package for handling intents.
我使用 Node.js 作为我的 webhook,同样使用actions-on-google包来处理意图。 I got the below piece of code from the documents, the same is added to my webhook
我从文档中得到了下面的一段代码,同样的代码被添加到我的 webhook 中
const app = dialogflow({ debug: false })
app.intent('Get Signin', (conv, params, signin) => {
console.log("signin", signin)
if (signin.status === 'OK') {
const access = conv.user.access.token // possibly do something with access token
conv.ask('Great, thanks for signing in! What do you want to do next?')
} else {
conv.ask(`I won't be able to save your data, but what do you want to do next?`)
}
})
app.intent('Default Welcome Intent', (conv) => {
conv.ask(new SignIn());
})
Whenever I invoke the agent, it is asking me to Link the account with Google(I'm not trying to login with Google though) the browser opens with My client's OAuth authorization endpoint, I have provided the login information and it returns back to the Google Assistant app with an error message saying每当我调用代理时,它都会要求我将帐户与 Google 关联(尽管我没有尝试使用 Google 登录),浏览器会使用我客户端的 OAuth 授权端点打开,我已提供登录信息并返回到带有错误消息的 Google 助理应用程序说
Sorry, something went wrong, so I couldn't sign you in. But you can try again later
抱歉,出了点问题,所以我无法让你登录。但你可以稍后再试
I tried outputting the variable sign in to the console and I can see the below error我尝试将变量登录输出到控制台,我可以看到以下错误
{
'@type': 'type.googleapis.com/google.actions.v2.SignInValue',
status: 'ERROR'
}
In the Google Assiatant App, I could see the redirect URI params as在 Google Assiatant 应用程序中,我可以看到重定向 URI 参数为
https://oauth-redirect.googleusercontent.com/r/YOUR_PROJECT_ID?code=AUTHORIZATION_CODE&state=STATE_STRING
I need clarity in below points我需要清楚以下几点
Help here is really appreciated.非常感谢这里的帮助。 Please let me know if the provided information is not sufficient.
如果提供的信息不充分,请告诉我。
问题已解决,我必须选中帐户链接设置中的复选框,其中显示“Google 通过 HTTP 基本身份验证标头传输 ClientId ans 机密”
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.