Ionic 3 - delete users when app uninstalled

I have an app that uses firebase and there I manage my users’ data.
The user is created by using phone auth, and the session is cached in the users’ phone
The problem I have is, that whenever the user deletes the app, the cache is deleted but the user profile in the database isn’t.

How can I solve this?

Why would you want to delete the user?
What if the user reinstalls the app and logs in with the profile from before the uninstallation?

The problem is, as stated above, the cache is deleted, so the session will be lost and the user wouldn’t be able to log in again.

Why don’t you save the “cache” in a database online instead of on the users device?
Anyhow, you can’t know if the app is uninstalled.