Been wondering how Firebase knows which user the device belongs to after app has been deleted?
Even after I delete the app, when I install it again, it knows the user.
I can't find in the documentation anything about this.
Firebase does not watch on user uninstall app or install app and that saved the data based on it's backend. You need to do code for all the funtional work based on firebased API.
https://www.firebase.com/docs/ios/api/#firebase_createUserpasswordwithValueCompletionBlock
https://www.firebase.com/docs/ios/guide/login/password.html
Following its a Sample code:
let ref = Firebase(url: "https://<YOUR-FIREBASE-APP>.firebaseio.com")
ref.removeUser("[email protected]", password: "correcthorsebatterystaple",
withCompletionBlock: { error in
if error != nil {
// There was an error processing the request
} else {
// removed successfully
}
})
So you need to add one button called Delete user or Remove user and on that button action you need to fire above code for delete user from firebase database. So when user install app again and try to login there recored not found and user need to register again with your app to logged in back.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With