gpt4 book ai didi

Android AccountKit.getCurrentAccount 返回 "API calls from the server require an appsecret_proof argument"

转载 作者:太空宇宙 更新时间:2023-11-03 11:03:36 28 4
gpt4 key购买 nike

我正在尝试 Facebook AccountKit,如下所示:https://developers.facebook.com/docs/accountkit/android/integrating

我用以下方法启动了 AccountKitAcitivity:

AccountKitConfiguration.AccountKitConfigurationBuilder configurationBuilder =
new AccountKitConfiguration.AccountKitConfigurationBuilder(
LoginType.PHONE,
AccountKitActivity.ResponseType.TOKEN);
intent.putExtra(
AccountKitActivity.ACCOUNT_KIT_ACTIVITY_CONFIGURATION,
configurationBuilder.build());
startActivityForResult(intent, APP_REQUEST_CODE);

在我以“已验证”结束 SMS 登录流程后,当我在我的 Activity 中调用 AccountKit.getCurrentAccount(...) 时,我收到“来自服务器的 API 调用需要一个 appsecret_proof 参数”错误。

这只能通过关闭“服务器 API 调用的应用程序 secret 证明”来“解决”。这会降低我的应用程序的安全性……有什么建议吗?

最佳答案

如果您将“启用客户端访问 token 流”设置为 true,那么您只会在登录流结束时返回一个代码。您还需要设置 ResponseType.CODE。然后您可以在您的服务器上用它交换 token 。

如果您将“要求应用程序 secret ”设置为 true,则只能从服务器调用/me(以及其他一些)。 getCurrentAccount 本质上包装了/me 端点,然后无法调用。

关于Android AccountKit.getCurrentAccount 返回 "API calls from the server require an appsecret_proof argument",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36669139/

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