I was wondering, how do large companies handle user accounts and allow different applications to access them.

One example that comes to mind is Riot, their game League of Legends has a global user account that allows you to login to forums and the game client itself.

What sort of method would they be using to allow multiple systems to access this database.

  • \$\begingroup\$ I'm not sure I exactly understand. When sharing a database between programs you simply create the database (using something like Microsoft SQL Server) and give the programs connection strings so that they can query data. Once they are able to connect to the databases all they have to do is pass the login credentials and that should be it (as far as user validation is concerned). \$\endgroup\$ Commented Feb 6, 2013 at 17:05

2 Answers 2


--- EDIT ---

The answer assumes that you're going to use HTTP for communication between your game and your backend database.

One choice would be to implement your own authentication and authorization mechanism.

Basically, you should have some sort of API on the backend system (database) and protect that via some auth mechanism:

  • signed requests
  • basic authentication (good for internal applications & consumers of the API)
  • oauth (good for external 3rd party consumers of the API)

Second choice is to use a platform that gives you backend as a service (BaaS). Most of these providers also give you a lot of security mechanism like oAuth server for instance and you don't have to worry for the backend infrastructure a lot. You just have to worry about how you're going to use it.

Checkout apigee and Parse for the second option.

  • \$\begingroup\$ How would I go about implementing the first option? \$\endgroup\$ Commented Feb 6, 2013 at 10:28
  • \$\begingroup\$ First you'll have to make a database with tables and structure that fits your needs. Then you'll have to make some HTTP layer (PHP, Python, Java, Ruby) that gives access to the database and perform the operations that you need. For instance, get, save or delete data. Then you'll have to secure your HTTP layer (API) in some way, so that it can be accessed by your application only (with some credentials or key). This is where the security of the API is concerned. And then you make your client applications to access that HTTP layer with HTTP requests. \$\endgroup\$
    – luben
    Commented Feb 6, 2013 at 12:54
  • \$\begingroup\$ But I would suggest you to consider the second option, because all that burden of creating and maintaining a database, HTTP layer and security mechanisms will already be done for you. You will just use their ready-to-use API to get, save and delete data. They give you a lot of requests for free, so by the time you need to pay them, you'll really be rich! :) \$\endgroup\$
    – luben
    Commented Feb 6, 2013 at 12:57
  • \$\begingroup\$ haha alright thanks :). I was just curious about the steps needed for the first option, I'll most likely use the second option like you suggested, Thanks a lot! :D \$\endgroup\$ Commented Feb 7, 2013 at 2:51

It's probably the same way that you would do it with just the game - you have a database somewhere that both have access to. If they're really paranoid they might have one database as a mirror of the other, and when you sign up it copies your details across.

The larger problem for big companies is redundancy and sharding, to share the data across multiple servers so that they can load-balance the usage from everyone trying to access it. A lot of DB software has this built-in nowadays.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .