I have 2 types of users:
Guests -> log in using PlayerIO.connect and randomized guest name -> should not store/load from DB
Registered users -> log in using simple users -> should store/load from DB
My problem is I can't find a good way to tell if a user is a guest.
I could check if their username starts in "Guest-" but that's not really secure if somebody figures out a way to send a different username as a guest (eg by decompiling the game). Or I could put a "isGuest: true" property in the join data but again this could be disabled by someone determined.
This is a problem because playerObject is automatically created if the player doesn't exist, and I don't want this to happen if someone is a guest! In short, what I want is a good way to do "if (player != guest) { loadPlayerObject(); }"