无法使用“使用 Apple REST 登录”获取电子邮件地址或 Apple ID API

Can't get email address or apple id using Sign in with Apple REST API

我正在尝试在我的网站上实施使用 Apple ID 登录。
我可以使用 this documentation after that I can get access_token, token_type, expires_in, refresh_token, id_token from https://appleid.apple.com/auth/token 获取 code 和 id_token,但我仍然不知道如何获取客户的电子邮件地址和 apple id。
谢谢。

响应的一部分是 id_token。此令牌是 JSON Web 令牌 (JWT)。 您可以解码此 JWT,除了一些其他值外,您还将获得用户的电子邮件地址。

但是您不会获得用户的 apple id。最重要的是,据我所知,您不会获得用户的真实电子邮件地址。

您可以在 Apple 的开发者文档中获取有关登录流程的更多信息:Authenticating Users with Sign in with Apple