我们正在为 Web 应用程序实现 Sign In with Apple 功能。我们遵循基于 ReST 的方法。授权调用工作正常,我们正在返回请求对象上获取“代码”和“状态”值。但我没有得到客户信息。
授权端点:https ://appleid.apple.com/auth/authorize
苹果文档中完全缺少用户信息部分。有谁知道要访问哪个端点来获取用户信息以及请求格式是什么。
我已经尝试了来自 Apple 的令牌 API 调用,我得到的响应是 'unsupported_grant_type'
端点:appleid.apple.com/auth/token
标题:svc.addHeader("Content-Type", "application/x-www-form-urlencoded");
身体 :
{'client_id' : client_id, 'client_secret_key' : client_secret_key,
'grant_type' : grant_type, 'code' : code, 'redirect_uri' : redirect_uri}
我们设置为“authorization_code”的 grand_type 值。
响应服务=AppleSignInTokenService 状态=ERROR errorCode=400 errorMessage={"error":"unsupported_grant_type"}
请让我知道我哪里出错了。