Cortana - OAuth2重定向URL配置不变

时间:2018-03-28 10:01:54

标签: oauth-2.0 botframework cortana

我目前正在使用Microsoft Bot Framework和Cortana作为我的渠道之一实施OAuth2身份验证。但是,在我设置OAuth2配置时,我在知识库 apps.dev.microsoft中正确设置了重定向网址的详细信息。 com

知识库: enter image description here

apps.dev.microsoft.com: enter image description here

每当我根据我配置的OAuth2对Cortana进行身份验证时,重定向URI似乎始终设置为 https://www.bing.com/agents/oauth 。这是我从fiddler获得的Cortana身份验证的http请求的屏幕截图:

enter image description here

导致此错误消息:

enter image description here

知道如何解决这个问题吗?

1 个答案:

答案 0 :(得分:0)

请不要忘记漫游器通道(在本例中为Cortana)必须是重定向所指向的位置。 Cortana的重定向为https://www.bing.com/agents/oauth。  Documentation here。您可以通过botframework和仿真器测试OAuth。在这种情况下,重定向为https://token.botframework.com/.auth/web/redirectDocumentation here。如果查看第10页the spec中的图,您会看到Cortana是客户端。验证电话需要回到她那里。您还需要让auth服务器知道允许重定向URL。对于Microsoft登录,请转到to the app dev portal,选择您的应用程序,然后添加“ Web平台”并注册重定向URL。那应该从两端解决问题。