ios - 在 Firebase 中不推荐使用 getTokenForcingRefresh。用什么来代替它?
<p><p>在最新版本的 <code>Firebase</code> 中,<code>getTokenForcingRefresh</code> 已被弃用。我正在使用它,因为身份验证 token 过期,我需要能够刷新 token 并在它失败时重试休息命令。这个 API 的正确替代品是什么?</p></p>
<br><hr><h1><strong>Best Answer-推荐答案</ strong></h1><br>
<p><p>看起来您需要使用 <code>getIDTokenForcingRefresh:completion</code> API 而不是已弃用的 API。</p>
<p>请在此处查看 <code>FIRUser</code> 类文档:<br/>
<a href="https://github.com/firebase/firebase-ios-sdk/blob/master/Firebase/Auth/Source/Public/FIRUser.h#L307" rel="noreferrer noopener nofollow">https://github.com/firebase/firebase-ios-sdk/blob/master/Firebase/Auth/Source/Public/FIRUser.h#L307</a> </p></p>
<p style="font-size: 20px;">关于ios - 在 Firebase 中不推荐使用 getTokenForcingRefresh。用什么来代替它?,我们在Stack Overflow上找到一个类似的问题:
<a href="https://stackoverflow.com/questions/47542421/" rel="noreferrer noopener nofollow" style="color: red;">
https://stackoverflow.com/questions/47542421/
</a>
</p>
页:
[1]