Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Firebase user deleted but still logged in on device

I started playing with a simple emailAndPassword authentication. I was able to create a user and sign-in. Then I went to the firebase console and deleted the user. Isn't that supposed to log-out in all devices? I still receiving the logged-in user in onAuthStateChanged() and firebase.auth().currentUser. I am missing something? I am getting the full user info, even that doesnt exist anymore in the users table.

I am using react-native-firebase bindings

like image 402
Spmbx Avatar asked Jun 01 '26 05:06

Spmbx


1 Answers

Firebase Authentication tokens are valid for one hour and cached on the user's device. It is automatically refreshed by the client SDK. Deleting the account doesn't proactively reach out to all the user's devices to delete the token.

However, if you then try to read or write data that requires authentication, that should fail when using the cached token.

like image 104
Doug Stevenson Avatar answered Jun 04 '26 11:06

Doug Stevenson



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!