在Firebase中不推荐使用getTokenForcingRefresh。要替换它的是什么?

时间:2017-11-28 23:04:50

标签: ios firebase firebase-authentication

Firebase的最新版本中,getTokenForcingRefresh已弃用。我正在使用它,因为auth令牌过期,我需要能够刷新令牌并在失败时重试rest命令。该API的正确替代品是什么?

1 个答案:

答案 0 :(得分:0)

您似乎需要使用getIDTokenForcingRefresh:completion API而不是弃用的。

请在此处查看FIRUser课程文档:
https://github.com/firebase/firebase-ios-sdk/blob/master/Firebase/Auth/Source/Public/FIRUser.h#L307