【问题标题】:AADSTS50011 - The reply url specified in the request does not match the reply urls configured for the applicationAADSTS50011 - 请求中指定的回复 url 与为应用程序配置的回复 url 不匹配
【发布时间】:2018-12-21 11:34:42
【问题描述】:

我在尝试使用 OpenID 从我的移动应用登录时遇到此错误。

我正在使用 React Native App Auth (https://github.com/FormidableLabs/react-native-app-auth#azure-active-directory) 向 AAD 验证我的应用程序。 Okta 和 Google OpenID 提供商已经使用了相同的设置。

这些是我在应用程序上使用的设置:

{
  issuer: 'https://login.microsoftonline.com/{directory_id}/v2.0',
  clientId: {my_client_id},
  redirectUrl: 'com.krev.krev://oauth2redirect',
  scopes: ['openid', 'profile', 'email']
}

这是 AAD 上应用清单中的相关信息:

"replyUrlsWithType": [
    {
        "url": "com.krev.krev://oauth2redirect",
        "type": "InstalledClient"
    }
],

我已经尝试将“oauth2AllowUrlPathMatching”更改为无效

【问题讨论】:

  • 您是否 100% 确定完全正确应用设置中的内容?没有拼写错误或缺少字符?

标签: azure-active-directory


【解决方案1】:

我注意到https://github.com/FormidableLabs/react-native-app-auth 中的几个redirectUrl 示例使用<scheme>:/<something> 模式(只有一个正斜杠/),但在您共享的设置中,您有<scheme>://<something>(有两个正斜杠//)。您可能不小心只留下了一个斜线并授权了两个斜线(反之亦然),或者有另一个错字。

【讨论】:

  • 遗憾的是,不,它们是相同的 url,已经复制/粘贴了好几次。双斜杠是 AAD 的要求,在其他地方我使用的是单斜杠。但它在应用程序和 AAD 清单中的设置相同
【解决方案2】:

不是很相关,但这是我这边的一个错误。我在代码的另一个地方覆盖了 url。

【讨论】:

    猜你喜欢
    • 2020-12-25
    • 2020-07-12
    • 2018-10-05
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多