从Google Home Simulator链接OAuth2帐户时,redirect_uri_mismatch [英] redirect_uri_mismatch when OAuth2 account linking from Google Home Simulator

查看:195
本文介绍了从Google Home Simulator链接OAuth2帐户时,redirect_uri_mismatch的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个帐户链接集成,用于与API.AI进行 Google上的操作集成,以便与Google Home一起使用。当我在模拟器中测试该代理程序时( https://developers.google.com/actions / tools / web-simulator



这是我的期望:

  {
response:看来您的会议管理者帐户尚未链接。您可以将会议管理器从Google Home应用程序链接到您的Google帐户。,
audioResponse: //NExAARC...\"content_copy,
debugInfo:{
sharedDebugInfo:[
{
name:帐户链接网址,
debugInfo: https://assistant.google.com/services/auth/handoffs/auth/start?provider={project-id}_dev&return_url=https://www.google。 com /
}
]
}
}

但是,当我遵循

  res.debugInfo.sharedDebugInfo [0] .debugInfo 

链接,我得到标准的 redirect_uri_mismatch 错误页面,其中包含以下详细信息:


请求中的重定向URI,
https ://oauth-redirect.googleusercontent.com/r/ my-project-id
与为OAuth授权的匹配客户。访问
https://console.developers.google.com/apis/凭据/ oauthclient / 我的客户端ID ?project = 我的客户端ID
以更新授权的重定向URI。



当然不可能将 googleusercontent 域添加到
重定向中,这不是我在$ b中指定的重定向$ b API.AI对Google集成的操作。


在API.AI方面,我的Auth Url是标准的Google:
https://accounts.google.com/o/oauth2/v2/auth



和我的令牌网址为:
https://myendpoint.com/google-home-token-endpoint
,合并范围为 calendar



在Google开发人员控制台上,我将令牌URL设置为与API.AI中相同,并且项目ID /客户编号与参照相同

这是一个已知问题吗?我可以尝试其他调试工作吗?

解决方案

请参阅Leon对我的原始问题的评论。



当前无法使用您不拥有的API的Actions进行帐户链接。


I am developing an account linking integration for an "Actions on Google" integration with API.AI for use with Google Home. When I test this agent in the simulator (https://developers.google.com/actions/tools/web-simulator)

As expected, this is my response:

{
    "response": "It looks like your conference manager account is not linked yet. You can link conference manager to your Google Account from the Google Home app.",
    "audioResponse": "//NExAARC..."content_copy,
    "debugInfo": {
        "sharedDebugInfo": [
            {
                "name": "Account Linking Url",
                "debugInfo": "https://assistant.google.com/services/auth/handoffs/auth/start?provider={project-id}_dev&return_url=https://www.google.com/"
            }
        ]
    }
}

However, when I follow the

res.debugInfo.sharedDebugInfo[0].debugInfo

link, I get the standard redirect_uri_mismatch error page, with the details:

The redirect URI in the request, https://oauth-redirect.googleusercontent.com/r/my-project-id, does not match the ones authorized for the OAuth client. Visit https://console.developers.google.com/apis/credentials/oauthclient/my-client-id?project=my-client-id to update the authorized redirect URIs.

It's of course not possible to add the googleusercontent domain to the redirects, and this isn't the redirect I have specified in my API.AI Actions on Google intergration.

On the API.AI side my Auth Url is the standard Google one: https://accounts.google.com/o/oauth2/v2/auth

and my token URL is: https://myendpoint.com/google-home-token-endpoint with the Scopes filled in as calendar

On the google developer console, I have the token URL set to the same as in API.AI, and the project id/client id the same as reference in the requests.

Is this a known issue? Additional debugging efforts I can try?

解决方案

See Leon's comment on my original question.

It is not currently possible to do account linking with Actions for APIs you do not own.

这篇关于从Google Home Simulator链接OAuth2帐户时,redirect_uri_mismatch的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆