Hi!
On logout of an anonymous user, that user is destroyed hence deleted from the Database. See line 1151 in ParseUser
if (isAnonymous) {
return currentUser.destroy({ sessionToken: currentSession });
}
My question is regarding the design decision.
I understand to remove the Session and remove the user from disk, but I am wondering how come the user is deleted from the User collection. As any other user, the anonymous user can affect other Collections when they interact in the app (I am using it in React Native), and if the user for some reason logs out and the User gets destroyed, it can leave the Database inconsistent.
For example, an Anonymous user does a purchase of a product and that creates an entry in a Purchase Collection that is related to a User. If the anonymous user logs out, that Purchase is left related to a User that doesnât exist anymore.
There is probably a good reason for it and I might be missing something. In one hand I would like to know why, in case I might be doing something wrong and if there is any way around it.
Thank you!