Glossary:

  • Providers: Third Party Authentication/Market/Social Providers.
  • Engine/Language: Environment that developers are building their game in.
  • SDK/s: GameSparks software development kit for the engine/language.


Key Aspects:


There are 3 aspects you need to consider:

  • Which 3rd-party integration you want to authenticate with (Google, Steam, FB, and so on).
  • Which SDK (Unity, Unreal, JavaScript, and so on).
  • If the setup is vanilla/basic or if it is a more custom solution. 


Common Issues:


The following are common issues that may be encountered.


I don't understand how this particular social authentication works

Social Authentication relies on 3rd party integration, GS integration, and knowledge of the engine.


1- Check the documentation for the API call. Here you can see the input to the request and output that comes from the response to get a better understanding of what should be expected.


2- It is very important to configure your integration on the backend. You cannot make requests to their 3rd party providers if GameSparks is not provided with the necessary information. Provider-specific config can be found on the integrations page and must be enabled in the game's config. For example Google needs a Client ID and Client Secret. All their provider-specific config can be retrieved from their dev accounts on the dev console of your specific provider. Documentation for those providers will usually show exactly how to obtain and use tokens/keys/auth.


I don't know how to get auth token

1- With the nature of SDKs, engines, and 3rd-party providers, things change all the time. It's always good practice to check against the documentation of those you want to integrate with as well as GameSparks Integration Documents and Tutorials to ensure you're using the correct method to fetch the authToken.


2- The authToken string should be structured something like this: 44b297a8-162a-4220-8c14-dad9a1946ad2


3- You must take that string value of the auth token and forward it to a social authentication request.


My auth token doesn't work

Many things could be wrong here. The following are some potential resolutions for this issue:


Wrong Config: Double check that you have not forgotten to set the wrong or any config in the integrations page and that your backend isn't configured for a Google or Steam request.


Fault on Developer's End: Ensure there is nowhere you might have parsed the data wrongly, adding or removing away from the auth token. For example the token might be 'E@@@@MPLETOKEN' but in some cases developers have changed it to 'E@@@@MPLETOKENAccessToken' because they were testing and they left it as so.


Wrong Environment: Some providers have a specific configuration for testing environments, such as our Preview environment, and a separate config for Production Environments, such as our Live environment. Every provider is different. If all other possible mistakes have been checked, ensure you have the correct configuration for your environment.