The Number One Problem With Game Center

January 10th, 2011
Spencer Nielsen Follow snielsen42 on Twitter

The biggest problem I see with the current implementation (iOS 4.x) of Game Center is that there is no way for Game Center users to authenticate themselves to 3rd-party servers. Let me explain from the top. Game Center is Apple’s new games oriented social network and infrastructure on iOS devices. It has a lot of great features like leaderboards, achievements and matchmaking. Once a user creates an account on an iOS device they are perpetually signed in at the operating system level. This is great because it means that all existing and future Game Center games can take full advantage of its features, social connectivity and never have to make users create an account (users HATE creating new accounts) or even sign in again (unless of course they explicitly sign out). From the game developer perspective, Game Center is really awesome. There are a lot of developers (myself included) who do not want to have to:

  • Create a complete login infrastructure
  • Store and handle people’s passwords safely
  • Figure out some sort of account confirmation
  • Implement password recovery
  • Encourage users to start building YET another social graph on your service/game
  • Handle other support related support requests

For a lot of smaller games there is no way the work needed to do those things could be justified. This is why Game Center is so awesome. It does all of that work for you. It somewhat insulates the developers from the users and a user’s complete Game Center social graph follows them around from game to game. From a user’s perspective, they love having a unified interface for leaderboards, achievements and social aspects. The OS-level level integration provides a better experience and above all, they don’t have to create another darn account. From the looks of the AppStore, it seems that Game Center is getting really good adoption among developers. Games are adding achievements and leaderboards left and right. It almost seems like a requirement for any successful App Store game these days. But if you look closely, you might notice some features are not getting quite as much adoption. Features like matchmaking are not getting nearly the uptake that I would have expected considering how complicated online game organization and matchmaking can be to implement. One minor qualm that developers might have with it could be the arbitrary limit of 4 (!?) players in a Game Center organized match (are there not a ton of party and turn-based games that are dying so see this upper limit removed?). However, in my opinion the major issue keeping Game Center back from becoming the de facto game account login on iOS is that there is no Game Center 3rd-party authentication API.

Authentication, prove you are who you say you are

This feature is not needed for all games, but for any game that wants to maintain a server for state storage (or other reasons) and use Game Center user accounts, this missing feature is a deal-breaker. Lets take the game Words with Friends as an example to explain what it is and why it is needed. Words with Friends is an online implementation of Scrabble in which you take turns placing moves with your friends regardless of whether your devices are actively connected or not. The developer accomplishes this by maintaining a server that stores the state of every game being played and every move made. When you launch the game on your iOS device, it checks with the server to see if there have been updates to the game state, and when you decide to make a move it publishes that move to the server. “Words with Friends” has its own user account creation functionality that you need to go through before you can play a game. But what if you wanted to make a game with a similar gameplay model and use Game Center user accounts instead? Unfortunately this is not possible because there is currently no way for a Game Center user to prove to that game state server that they are, in fact, the Game Center user they claim to be. In other words, there is no way for 3rd-party servers to get authentication from Game Center users.

Without this authentication users could impersonate each other to the developer’s server. Anybody who wanted to could claim that they were Game Center user “A” and proceed to use that identity to cheat, ruin the real user A’s game experience or just generally mess things up.

Authentication API coming in iOS 5.0?

I want Game Center to become the de facto social network and user login infrastructure for games on iOS. It has a lot of momentum behind it and will only get better and more feature rich as time goes on. I believe that adding a 3rd-party authentication API will be the single biggest factor in making this happen. I want to make sure that this API makes it into iOS 5.0 for sure and have already filed a feature request with Apple (radar://8631125). If you also feel that this is an important feature, then head over to and file a feature request as well. It will be marked as a “Duplicate” but that is ok because an originating issues’s duplicate count is a contributing factor in gauging what it’s priority should be. Lets help make this a priority one issue and ensure that we will see some awesome Game Center games when iOS 5.0 rolls around.

(Below are some ways that I have come up with to potentially implement this feature in a future version of iOS. Basic understanding of how encryption keys can be used to prove identity is assumed.)

Technical Implementation #1

In order to facilitate this authentication I can think of two different solutions that would do the trick. The first would be to have the Game Center servers generate an encryption keypair for every Game Center game/user combination (only for the games that need the functionality of course). The public key for a given user playing a given game would be openly available from Apple’s Game Center servers for access by the servers that the developers maintain. The private key would be given out only to to Game Center users when they authenticate on an iOS device (in fact the actual key doesn’t even need to be directly available to the running game but could potentially be stored in the OS-level game components, and operations like cryptographic signing and such could be performed there). With the Game Center user’s public key on the developer’s server and the private key on the iOS device, the game can now prove to the server that the Game Center user is authenticated through a challenge and response or other cryptographic authentication methodology.

Technical Implementation #2

The second method I thought of would be to move keypair generation to the developer’s server, and institute a new per Game Center game/user combination “Keychain”. Like the per app/user Keychain in iOS it would allow developers to arbitrarily store generic data in a secure manner. But instead of being stored only on a single iOS device, when data is written to it its contents are synced up to the Game Center servers and synced down when read. That way, all the Keychain information stays the same across all iOS devices as long as the same Game Center user is authenticated on them. The information also remains safe in case the device is lost or destroyed. The developer’s server generates and stores both the public and private keys when a new user contacts the server for the first time. The server gives the private key to the new user’s iOS device and it in turn stores it in its “Game Center Keychain”. Now the server and iOS device have the keys (like above) needed to deliver the requisite proof of identity in the future. Unfortunately in this scenario the server does not have proof of the exact Game Center identity of the clients that are talking with it. It simply enforces that only the Game Center id that first contacted it for that private key will ever be able to authenticate against the companion public key on the server in the future. On the upside however, this kind of “Game Center Keychain” could also easily facilitate things like shared save game files between multiple devices with the same Game Center account because it would securely store per game/user data and sync it with all authenticated devices.

7 Responses to “The Number One Problem With Game Center”

  1. Kalon Says:

    I was thinking of a hack that might work. You could use another authentication mechanism for communicating with the server. You could possibly use any other authentication system (openid, oauth) that already exists, is commonly used, and supports 3rd party authentication. This would let you leverage third party support while at the same time prevent the user from having to set up a new account. They would only have to sign in once per device.

    For instance I would expect you could support Facebook Authentication. You wight as well spin it as a method for bragging rights but in reality you just want better security.

  2. snielsen Says:

    Good idea. I actually have considered using Facebook accounts instead if this issue doesn’t get resolved. In fact, I will probably look into adding Facebook account support for disconnected games that are played purely by syncing state through my server (My game is going to support both live connected games and disconnected games. Both are sync’d through my server). Game Center provides some nice matchmaking support for live games by handling notification, active player listing maintenance and NAT punching that I don’t want to give up though. I also have to assume that Game Center is going to become even more feature rich and performant as time goes on. FB Auth and FB Connect aren’t particularly games oriented but it would be better to use them than let cheaters run rampant on my server and most people already have a substantial social graph built up there.

  3. squidbot Says:

    Glad to find this post as it verified that there is no way to do server authentication with Game Center. I filed a dupe bug/vote. Our solution currently is to offer Facebook and Google OpenID authentication, as they both have iOS libraries available.

    BTW, you may be interested in which provides federated login and has an iOS library. I found it after I’d implemented our internal federation, alas.

  4. Jordan Says:

    Thanks for sharing this it was very helpful.

    Because it’s a year later, I’d love to read a follow-up from you on this if you found an alternate solution and how did that work out?

  5. Terrance Says:

    I’m curious as to how Dragonvale works for authentication. As far as I can tell they never ask for passwords and only go by game center login.

  6. Shaun Says:

    You could tie it to the UID of the install of the app. This would require the device UID to authenticate with the server. The drawback is of course that only the device used to start the specific ‘match’ could play that match.

  7. snielsen Says:

    @Shaun Yea, using the UID is good in a pinch but ultimately it has a lot of problems that disqualify it for the things that I am doing.

Leave a Reply

Entries (RSS) and Comments (RSS).