Codeigniter’s lack of an authentication system is both a blessing and a curse. The blessing is that you don’t need to conform to a pre-written and and conventionalised auth library, the curse is that writing your own can cause severe headachaes and countless hours of developing something that comes standard in most other PHP frameworks.
I am a huge fan of CakePHP’s authentication library, it has an ACL and Auth system baked in, which works really well and is super extensible, but the framework itself is a proverbial piece of shit disguised as a PHP framework.
FuelPHP has an awesome authentication library and powerful ACL functionality, it is an awesome framework and with a little work it could be ported to Codeigniter, but it still won’t do everything an auth/acl system should.
All of this has led me down the path of creating an authentication system so powerful it does everything, but is simple enough for anyone to use. My first attempt was WolfAuth, an authentication library for Codeigniter that sort of failed due to my lack of understanding of just what an auth system should have, until now.
I have been slowly and patiently rewriting WolfAuth to be an authentication roman warrior meets ninja type library for Codeigniter. It’s driver based, has a permissions system and most of all is easy to use. My current version works quite well, but it sadly relies on DataMapper ORM for Codeigniter which a lot of people don’t understand and use in their projects.
Due to the complexities of building a powerful auth system, DataMapper has allowed me to create relatively complex methods in WolfAuth really easily without the need of complex join queries and sub queries. You realise just how complex something relatively simple in theory can be when it comes to writing the database interaction stuff. It’s not that I don’t know MySQL, writing advanced database queries, and then optimising them is a pain in the ass and takes forever.
So my late night, early morning trade rides to work coding binges have resulted in a pretty awesome auth library, the likes of which the Codeigniter community hasn’t seen yet. WolfAuth aims to be the definitive auth solution for Codeigniter and within 2 weeks, a beta version of many beta versions will be released for you all to try.