我看到了描述
您最多可以每天验证一次刷新令牌,以确认该设备上的用户 Apple ID 在 Apple 服务器上的信誉良好。
在https://developer.apple.com/documentation/signinwithapplerestapi/verifying_a_user。
我对描述有两个问题:
- 为什么我们要验证
refresh token
而不是access token
确认用户的 Apple ID 在 Apple 的服务器上仍然具有良好的信誉? - 文档说刷新令牌每天只能验证一次。但我可以在实践中多次验证刷新令牌。文档和实现之间是否存在冲突?
2019年10月17日更新:</p>
对于在其他系统上运行的应用程序,使用刷新令牌的定期成功验证来确定用户会话的生命周期。
我还在https://developer.apple.com/documentation/signinwithapplerestapi/verifying_a_user中看到了上面的描述。我认为periodic
也与once a day
.
现在,我存储 access_token 并为后续验证请求设置自定义过期时间。并从 iOS 客户端(getCridentialState)获取通知以删除 access_token。