Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

getTokenForcingRefresh deprecated in Firebase. What to replace it?

In a recent version of Firebase, getTokenForcingRefresh was deprecated. I'm using it because auth tokens expire and I need to be able to refresh the token and retry a rest command when it fails. What is the right replacement for this API?

like image 879
Greg Gilley Avatar asked Apr 26 '26 11:04

Greg Gilley


1 Answers

Looks like you need to use getIDTokenForcingRefresh:completion API instead of deprecated one.

Please take a look at FIRUser class documentation here:
https://github.com/firebase/firebase-ios-sdk/blob/master/Firebase/Auth/Source/Public/FIRUser.h#L307

like image 124
Evgeny Karkan Avatar answered Apr 28 '26 01:04

Evgeny Karkan



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!