FAQs - Authentication

Can players use multiple forms of social authentication?

Yes. Players can link multiple social accounts to their GameSparks' player, provided your game allows it and the platform supports the authentication mechanism. You can read more about our social authentications here.

When a player authenticates, they receive an "auth token", what is this used for?

An auth token is generated on a successful authentication with GameSparks. This token is stored on the player document. If a player loses connection from GameSparks, when the connection returns GameSparks will validate this auth token and reconnect them silently. This means you don't need to implement potentially disruptive re-authentication logic. For details on how to access a player's auth token, pleasse see the Accessing Player Records tutorial.

Where does GameSparks store linked social account information?

In the Data Explorer under Collections > System, you'll find a System collection called externalAuthentication. When a player links a social account, a document gets created containing their social details. This document is linked to the player document via the $oid value under externalAuthentication. For more details on how to work with Collections in the Data Explorer, please see the NoSQL Explorer documentation page.

I understand that when a player registers, a check for uniqueness is performed for the username and password they use. Is there any way I can check for uniqueness for other fields that my players use, such as displayName?

Yes. You can use the Game Data Service and some Cloud Code attached to the RegistrationRequest and RegistrationResponse to do this. For an example that shows you how, see this Tips & Tricks article.

Did this page help you? Please enter your feedback below.