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.

Password Reset

You can request a password reset using the RequestPasswordReset method. By default, password reset emails will be sent to players from noreply@chilliconnect.com. The password reset email will contain a link to a password reset form hosted at accounts.chilliconnect.com. If you want to customise the email address password reset emails are sent from, please get in touch at support@chilliconnect.com.

You can customise the password reset email format from the settings table of the game view.

PasswordResetSettings

The following properties can be specified:

Game NameThe name used to identify the game to the player
Reset UrlThe URL that hosts the password reset form. You can set this to host the password reset form on your own server. Your page must extract the reset token and the game token from the URL and post them to the ChilliConnect server. See our sample reset form for specific details.
Image UrlThe URL of an external image to include in the reset email. The image should be no more than 500px in height or width.
Button ColorAn HTML color code used to color the password reset button link in the email and the ChilliConnect hosted version of the password reset form.
Redirect UrlA URL that the ChilliConnect password form will redirect the player to on successful reset - you can use an app specific URL scheme to open your game if the player is on their device.

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.

Twitch

Similar to the Google methods of authentication, a Player account can be linked to a Twitch account and use to login to ChilliConnect, using the LinkTwitchAccount method. Twitch OAuth details, including a RedirectURL, must be provided to ChilliConnect Dashboard before this functionality can be used however. After your ChilliConnect application have been given the appropriate details, an AuthCode can be obtained via Twitch and given to ChilliConnect to either Link or Login with the AuthCode. More Details can be found either in our Twitch Login Tutorial or via the Twitch Developer Deocumentation

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.