Closed jgero closed 3 years ago
When an auth user is deleted a function is triggered, which deletes the corresponding firestore document. The rest endpoint is deleting the document and the auth entry. To avoid broken accounts the document should be deleted in the auth deletion hook, because then it is still possible to delete auth accounts from the firebase console safely.
There is a cloud function that triggers on user delete in the auth and deletes the corresponding person document. But there is also a cloud function to delete a user that deletes the auth entry and document.
Have a look at the code to see what is used and remove the unnecessary cloud function.