Warning when removing a snap that stores private data

Is there a mechanism or guideline on how to warn a user when removing an app that stores private data will also erase that private data?

Imagine that an app stores an end-user license, an authentication token, or a private key in one of the subfolders of ~/snap/FOO_BAR. Uninstalling that snap will remove those folders and absent a previous backup, also the contents of these folders irrevocably.

So what is the recommended way to handle this?

I moved this to #snapcraft since this seems more like a question about building a snap.

Regarding backups, snap data is automatically saved with the snapshots feature, see https://snapcraft.io/docs/snapshots for more details. Perhaps enabling snapshots is sufficient for your use case?

This does feel more like a UX issue in snapd. Part of it is solved by the backup it does, but a warning about user data going away (and how to retrieve it) is absent.