Forum QuickConnect Initializing a User's BigDB PlayerObject on SimpleRegister

Discussion and help relating to PlayerIO's QuickConnect feature, including Facebook Connect and Kongregate Connect.

Initializing a User's BigDB PlayerObject on SimpleRegister

Postby blitzen » November 26th, 2013, 11:40 am

Hi, I'm using SimpleRegister to create users, but have some more information to store about them such as gender, location, etc.

At this point I'm putting these in a Dictionary<string,string> and passing it into SimpleRegister's "extraData" field, but according to another post, you can't then access this programmatically again (making one wonder what the point is). Thus to actually save any information other than the userid, password and e-mail, you'll have to make a separate PlayerObject and fill it out.

In a similar post, the answer pointed out a server-side example that always checks if the playerObject of a connecting player contains certain fields, and if not, it initializes them. However, since all server-side code is only being called from within a game instance, and you can't access a SimpleConnect user's extraData, how would it know what to put in there?

If you allowed clients to access BigDB directly, you could theoretically do it on the client by adding a client.BigDB.loadMyPlayerObject call within the success callback of SimpleRegister while it still has the extra profile information and Save() it then, but that'd be a security risk: since this is technically independent of the SimpleRegister call, I don't see what would stop someone from calling this by itself to fill your server with a million different PlayerObject records independent from the SimpleUser record they just logged in to.

So how does one register a SimpleUser and also initialize the corresponding PlayerObject record with the extra information securely?
blitzen
 
Posts: 12
Joined: February 6th, 2013, 4:48 am

Return to QuickConnect