gpt4 book ai didi

android - Bluemix 示例应用程序失败并返回 "Failed to authenticate against MCA"

转载 作者:搜寻专家 更新时间:2023-11-01 08:36:12 26 4
gpt4 key购买 nike

我正在尝试构建并运行这个 Bluemix 示例应用程序:

BMS samples: helloTodoAdvanced

我正在逐字按照项目的 README.md 中的说明进行操作。具体来说:

  1. 从 Github 清理 bms-samples-hellototodo-advanced 项目。

  2. 创建了一个新的 Bluemix“MobileFirst Starter”样板应用。

  3. 从 Bluemix 控制台和 Web UI 验证了基本功能。

  4. 使用示例应用中的包和类创建了一个新的 Facebook 应用 ID。

  5. 配置 BlueMix 移动客户端访问 (MCA) 以使用我的 Facebook 应用程序 ID。

  6. 根据项目说明更新了 NodeJS server.js 应用。

  7. 使用 Facebook 应用程序 ID、Bluemix 路由和 Bluemix 应用程序 GUID 修改了 Android 应用程序源。

  8. 我在 Genymotion 模拟器上运行:Samsung Galaxy Sr/Android API 18

  9. 这是一次尝试运行的 Android Studio logcat:

04-04 17:19:58.859 1276-1298/com.ibm.hellotodoadvanced E/MainActivity: Failed to authenticate against MCA: Response: {"error":"unauthorized_client","error_description":"Unknown client"}04-04 17:19:58.859 1276-1298/com.ibm.hellotodoadvanced E/MainActivity: Failed to authenticate against MCA, unknown reason04-04 17:19:58.863 1276-1291/com.ibm.hellotodoadvanced E/mfpsdk.AuthorizationProcessManager: AuthorizationProcessManager.handleAuthorizationFailure in AuthorizationProcessManager.java:426 :: authorization process failed

<= 程序加载并运行...但身份验证失败并出现此错误!

问:关于如何调试“无法针对 MCA 进行身份验证”错误,有什么建议吗?

问:您应该直接从 Android 登录 Facebook 吗?

我的理解是“否”——Bluemix 直接通过 Facebook 对应用程序进行身份验证; Android 用户无关紧要。

问:是否需要任何其他“陷阱”来获得与 Bluemix for Android 一起使用的 MCA 身份验证?

最佳答案

我认为您需要从设备上卸载您的应用程序然后重新安装它,这通常是“未知客户端”情况下的问题。
Q1:我不认为有任何特殊的方法来调试身份验证流程(只是常规的 android 调试器)
Q2)是的,流程是:用户登录到 facebook,然后将 token 发送到 MCA 服务器,该服务器会验证它并授予您 MCA token ,这将使您可以访问 protected 资源。
Q3) 您需要执行将 facebook 添加到 android 应用程序的所有说明(如果您看到 facebook 弹出窗口,那么我认为您已经执行了此流程)。可以关注this link了解更多信息

关于android - Bluemix 示例应用程序失败并返回 "Failed to authenticate against MCA",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36415430/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com