# Mark the account as deleted and remove personal data
event :soft_destroy do
before do
+ revoke_authentication_tokens
remove_personal_data
end
blocks.active.detect(&:needs_view?)
end
+ ##
+ # revoke any authentication tokens
+ def revoke_authentication_tokens
+ oauth_tokens.authorized.each(&:invalidate!)
+ access_tokens.not_expired.each(&:revoke)
+ end
+
##
# remove personal data - leave the account but purge most personal data
def remove_personal_data