Skip to content

Player Accounts

ChilliConnect Player Accounts allows you to provide your players with different login methods depending on the needs of your game, as well as the ability for players to to log in to your game and retrieve account information across multiple platforms.

Creating Players

The recommended workflow in ChilliConnect is to create new player accounts anonymously, so that players can immediately start playing your game without having to provide login information. Once a player has created an anonymous account, your game should then attempt to get the player to link their account to a persistent login. Linking to a persistent login allows the player to login to their account on multiple devices and also means that if the player deletes your game, they can still recover their account if they later decide to re-install.

The initial anonymous player accounts can be created in one of two ways:

  • Using the CreatePlayer method. This creates a new anonymous account with no associated details and returns the ChilliConnectSecret as well as the ChilliConnectID. You can then log this player in using the LogInUsingChilliConnect method.

  • If your game is on a mobile platform, you can use the LogInUsingMobileDeviceId method with the CreatePlayer flag set to true - this will either log the player in to an existing account associated with their Device Id if one exists, or create a new account.

Note that developers should exercise caution when using Mobile Device Id based login - in particular, it is very, very important to ensure that the DeviceId you provide is vendor scoped - i.e. the Device ID is not the same for apps distributed by different vendors. Using a Device ID that is not vendor scoped is a security risk. For Apple devices, you should use the identifierForVendor property. For Android devices, you should use ANDROID_ID, but only for devices on Android 8.0 and above. If a vendor scoped device identifier is not available, you should use the CreatePlayer method instead.

Once the initial anonymous account is created, you can link the account to a persistent login using one of the below methods:

  • UserName
  • Email
  • Facebook
  • Google
  • GameCenter

Further details on each of these login methods are provided below.

UserName or Email

Once a player is logged in to your game you can use the SetPlayerDetails method to assign your player a DisplayName, unique UserName, unique Email as well as Password.

Once a player has been associated with either a UserName or Email and a Password, the LogInUsingEmail and LogInUsingUserName methods can be used to allow the player to login to their account on a different device using the same credentials they supplied previously.

Facebook

In addition to Email and Username, players can also retrieve their account on multiple devices by associating their anonymous ChilliConnectID with a Facebook Account. This can be done by using the LinkFacebookAccount method. Once the association has been made, the player can then log in to their account on a different device by using the LogInUsingFacebook method.

GameCenter

Players can also associating their anonymous account with an iOS device GameCenterID. This can be done by using the LinkGameCenterAccount method. Once the association has been made, the player can then log in to their account by using the LogInUsingGameCenterID method.

Note that until very recently, Apple did not make it possible for 3rd party services to authenticate that a GameCenter was legitimately provided by a logged in player, therefore, the GameCenterID provided to ChilliConnect is not checked. This means that LinkGameCenterAccount should not be used for competitive or social games where other player accounts are visible. If possible, use one of the alternative logins above.

Google

Players can link their account to a Google account using the LinkGoogleAccount method. Before attempting to use this method, Google OAuth Credentials must be provided to the ChilliConnect dashboard under the settings for your game. Once configured, a Server Auth Code should be obtained from the device and provided as the AuthCode parameter. Once the association has been made, the player can then log in to their account by using the LogInUsingGoogle method.

Steam

Players can be linked to a Steam account using the LinkSteamAccount method. Before attempting to use this method, Steam Authentication details must be provided to the ChilliConnect dashboard under the settings for your game. In your game using the Steamworks API get a SessionTicket for the player, and supply this to the LinkSteamAccount call. The player will be associated with the Steam account. Once this association has been made, the player can be logged in to their ChilliConnect account by using the LogInUsingSteam method.

Log In Expiry

By default, each ConnectAccessToken is valid for 24 hours. Once the ConnectAccessToken expires, an error will be returned by the API and the player must be re-authenticated. Depending on the needs of your specific game, you have two options.

Firstly, if the player has been associated with either a DisplayName, Email or Facebook account, you can simply prompt the player to provide their credentials again.

Secondly, if you would rather that once authenticated the player no longer has to provide their credentials again, you can use the LogInUsingChilliConnect endpoint to retrieve a fresh ConnectAccessToken in the background. Each of the Player Login methods returns both the ChilliConnectID and the ChilliConnectSecret so that once a player has authenticated on the device, you can continue to generate ConnectAccessTokens.