使用AppleID登录的app,可以在设置->密码与安全性->使用Apple ID的App里找到:
实现苹果登录
注销:
(https://developer.apple.com/documentation/sign_in_with_apple/revoke_tokens)
流程思路:
- 将authkey经JWT函数生成的client_secret和苹果登录时获取到的authorizationCode(仅供一次性使用,有效期为五分钟),client_id, grant_type传给https://appleid.apple.com/auth/token
- 上面返回一个refresh_token后再传给 Sign in with Apple REST API 就可以注销成功
注意: 检查authkey是否勾选了"Sign In with Apple"!!!
client_secret最好放在后端