google-apps-scriptgmail-addonsgsuite-addons

How to delete User Property Services when User deletes G-Suite Add-on


I'm developing a G-Suite add-on that is storing user auth tokens for an external API within User Property Services as Google recommends. I'm planning to implement the OAuth2 Service as well for publication purposes.

My assumption would be that when a user deletes an add-on, the property services associated with that user (and thereby their auth tokens) are deleted as well. However, I haven't found any documentation that says Google deletes a users property services storage when a user uninstalls an add-on. In fact, I have found numerous instances where this isn't occurring for other add-ons, and uninstalling my own unpublished add-on and reinstalling from manifest has shown to still have my auth token stored.

I understand this is a duplicate of Google app script,gmail addon remove user properties while uninstall addon, but that post did not provide any solution for this issue.

I'm curious how other developers are handling this issue, as I can't imagine current add-ons would simply like their users' OAuth tokens floating around in the Google cloud even when they uninstall their add-on. Does Google provide a solution for this, or perhaps delete the property services over some length of unused time?


Solution

  • As they do with other services, user data could take some time to be completely being removed after the user requested that (i.e. by means of deleting their account) from the their servers.

    Anyway, you could add something to your add-on to remove the user data upon user request while they still have installed the add-on in order to prenvent that the data be there if your add-on users re-install it.