Community Auth for CodeIgniter 3.0

I resisted doing anything with CodeIgniter 3.0 for a long time, mostly due to the licensing that Ellislab had said they were going with. BCIT changed the license due to popular demand, and with an EOL notice for the 2.X branch posted about a month ago, I decided it was time to convert Community Auth over to CodeIgniter 3.0.

I had initially stepped through CodeIgniter’s upgrade guide and made Community Auth fully functional in CodeIgniter 3, but then I decided to make some pretty drastic changes. In the past, I had distributed a fairly elaborate example application with Community Auth. It had user registration, user creation, user management, and was a pretty full featured set of examples. The problem with doing that is that people expected that it was meant to be their application, and that they would just tweak it to meet their needs.

The new version of Community Auth removes all but the bare minimum in terms of examples, and it is no longer an application, but instead a CodeIgniter third party package. The real benefit here is that it’s now easier than ever to install Community Auth in an existing application. The older version of Community Auth would have made this very difficult.

If you’re a CodeIgniter developer looking for an authentication library for CodeIgniter 3.0, I hope you’ll give Community Auth a shot. For more information, and to download Community Auth, please visit the Community Auth website.

Posted July 17th, 2015 in ,

Reader Comments (6)

Virgil-Adrian Teaca

Well, if you already have a CI3 variant of ol’good Community-Auth demo site, I would love to see it published…

To be honest, I’m very interested in Community Auth to use hard-coded Roles/Groups and the ability to associate different profiles for every role. The profiles integration ability looks to be nuked in your current CI3 variant, and is the thing that makes me have almost zero interest to study it. And installing it in “thirdly_party” is not really my cup of tea. No offense.

What I want and I need is right on this good ol’ implementation, with all the bells, preferable under CI3. In fact, I must right now port it to CI3. But, if you already have done this task, why not publish it and spare your code fans from duplication of your work?

All the best!


In the process of doing the work to convert Community Auth to be used in CI3, my initial goal was just to get it to work with CI3. That was easily done just following the upgrade guide, and only took a couple of hours. I have lost that revision though, due to a destructive action I took on the repository. I’m sorry about that.

In the near future I plan to publish a guide for creating profiles in the current version of Community Auth. Yes, the profiles integration was nuked from Community Auth, and for a good reason. The reason being that Community Auth is no longer trying to be an application, and needs to be more easily integrated into an existing application. An authentication library really has no business making many decisions about the way an application should be written, and doing so actually restricts the developer, or makes them do extra work to rip it out the stuff they don’t need.

The third_party method of integration also intends to make installation in an existing application as easy as possible. Usage of CodeIgniter third party functionality is simple, and Community Auth has provided the easiest way possible to extend classes for your own customization. Can you tell me what it is that you think is wrong with installing Community Auth as a third party plugin? It is actually very flexible.

If perhaps somebody that is qualified to maintain the old version of Community Auth would like to do so, they should feel free to contact me. The idea of this project was initially to be a “Community” effort, but nobody ever came forward to help. This is the reason why I make the sole decisions for Community Auth, and why it has progressed the way it has.

I can’t make Community Auth be all things for all people. I have only had one pull request ever, which should show you my level of dedication to the project, and percentage-wise still makes me the sole contributor. Things would be different if the CodeIgniter community had shown real interest and contributed to the project. Because my time is valuable, and I have such little of it, the future of Community Auth remains completely up to me.

I won’t have any regrets or bad feelings about the way that I have managed Community Auth. I get almost no useful feedback, and although you’re obviously not happy with it, you haven’t suggested how to make things better while still maintaining the project goals. Do some work and show me some pull requests!


Hey Brian, I know this might not be the best forum to reach out to you for Community Auth issues, regardless I’ll give it a shot! I’m getting an error after login in which I cannot find the solution anywhere. I’ve followed the instructions on a plan clean CI3 install. The error is: Invalid driver requested: Session_session_id. Awesome work with this code, ty.


Sorry it has taken so long to respond. I haven’t seen this error or heard anyone else complain about it, but it sounds like a CI drivers issue. You are attempting to use Community Auth for CodeIgniter 3.0 with CodeIgniter 3.0 (not 2.X), yes?

You, along with anyone else, can benefit from me checking your install, but I need access. If you’re just playing on a dev machine, You can zip up your files and provide me with a DB dump, and I’ll track down your problem.

It’s been my experience that most people that have problems with Community Auth just haven’t actually installed it right, or they did something wrong that doesn’t have anything to do with Community Auth.


hello brian…good job..iam just a newbie in programming. and want to learn much more using codeigniter including in Community Auth.
keep your work. cheers from indonesia


Hello Brian,

I ‘ posting mostly because I want to congratulate you for this amazing library. I started “scratching” community auth’ s files since “git version” for CI v. 2.* , and I m very happy I’m still working with it , flawlessly, on 2-3 small projects.

I think it’s really one the most flexible libraries for CI I have ever used and I really don’t understand why a huge community is not behind it already.

Especially your inline documentation of code is the best ever found by far..Makes it so easy to understand. Maybe people are choosing libraries the same way they choose clothes or other fashion bits.

I agree that distributing the new version as a third_party app is the way to go, it’s more clear, and helps others to integrate it more easily in their apps. And being stripped from the “application part” was essential for this to happen.

Though, last days I ‘ve started changing parts of the old version’s code, on my dev machine, so it can work with the CI3 but then I decided that it’s maybe better to take code parts from the old version and rewrite them following CI3 conventions..

That’s because I also liked the idea that this project maybe should have a second repository with a
“basic application” version in parallel..But It should definitely be a Community effort..

I hope that in near future I ll be able to finish it and send you back or upload on bitbucket but I m afraid that time is my huge enemy and I m not going to finish it on my own. I hope other devs will express their will to support this .

Anyway, thanks again keep on your great work !!

Leave a comment