Search code examples
google-cloud-firestorefirebase-authenticationgoogle-cloud-functionsfirebase-extensions

Firestore - Delete all user data


I have seen that there is an extension called "delete user data" which simplifies the data deletion process performing hard deletions in order to accomplish with the GDPR policies.

This extension is really cool, and let us config it specifying full path to docs or collections, including storage stuff. But... what if I need to run a query because the user id is not the identifier of the document?

Is it possible to configure the extension to "perform queries"? Is it perfectly normal to run another auth triggered cloud function for deleting query-related docs/fields?


Solution

  • Yes, you can have as many cloud triggered events as you like.

    It sounds like, based on the information you've provided that writing a new Cloud Function triggered onDelete would be the best approach.