CodeIgniter Forums
How to create centralized User Management System - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: How to create centralized User Management System (/showthread.php?tid=25560)



How to create centralized User Management System - El Forum - 12-16-2009

[eluser]FutureKing[/eluser]
Hi, I am going to create several applications that will be used by many registered users. But I want to create a system that user has to be register once and he/she can use all of my applications with single username & password. It is similar to google/yahoo. You just need one Google / Yahoo ID and you can use all of their services with that username. No need to register again.

Can you help me to understand how should I design database and classes? How should I design the System?


How to create centralized User Management System - El Forum - 12-16-2009

[eluser]BrianDHall[/eluser]
This is much easier than you might think. Its really just the basic auth system, and you just call the same system and database with all your applications. You might check around the forums regarding how to do multiple database connections and such topics, as you might want to connect to one database for your auth and then have another database for your app.

The only sticky point you ever really run into is cookies. There are various tricks, but most of them just work with redirects - if they click 'login' they go to your shared enterprise login system, it detects the pre-existing cookie if logged in or if not it logs them in, then redirects them back to the original site with a special instruction - such as a token id - that the site uses to issue you a first-party cookie.

It really doesn't need too much special engineering.