Skip to content
[MERGED] MongoDB support for CodeIgniter IonAuth authentication library.
PHP CSS JavaScript
Find file
Pull request Compare This branch is 3 commits ahead, 414 commits behind benedmunds:2.
Latest commit 37f4ccf Jun 10, 2014 Sepehr L Fast forward to upstream/2 branch.
Failed to load latest commit information.
config Issue #566 Bcrypt password to 0 May 25, 2014
controllers Update auth.php May 22, 2014
language UTF-8 Encode File Jun 1, 2014
models Possible security problem May 28, 2014
userguide Added upgrade instructions to the Ion Auth docs Apr 18, 2014

Ion Auth 2

The future of authentication

by Ben Edmunds

Redux Auth 2 had a lot of potential. It's lightweight, simple, and clean, but had a ton of bugs and was missing some key features. So we refactored the code and added new features.

This version drops any backwards compatibility and makes things even more awesome then you could expect.


Documentation is located at


Just copy the files from this package to the corresponding folder in your application folder. For example, copy Ion_auth/config/ion_auth.php to application/config/ion_auth.php.

CodeIgniter Version 3 Compatibility

CodeIgniter v3 requires the class names to be ucfirst(). In order to support this follow the standard installation procedures and then either rename the following files or create symlinks

config/ion_auth.php               =>   config/Ion_auth.php
models/ion_auth_model.php         =>   models/Ion_auth_model.php
models/ion_auth_mongodb_model.php =>   models/Ion_auth_mongodb_model.php

Relational DB Setup

Then just run the appropriate SQL file (if you're using migrations you can get the migrations from JD here:

MongoDB Setup

Integrate the following projects to enable MongoDB support in CodeIgniter:

CodeIgniter MongoDB Active Record Library -
CodeIgniter MongoDB Session Library -

Set $config['use_mongodb'] = TRUE; in the config file and then run the following command:

$ mongorestore sql/mongo


In the package you will find example usage code in the controllers and views folders. The example code isn't the most beautiful code you'll ever see but it'll show you how to use the library and it's nice and generic so it doesn't require a MY_controller or anything else.

Default Login

Username: Password: password


It is highly recommended that you use encrypted database sessions for security!


It is recommended that you add your identity column as a unique index.

Feel free to send me an email if you have any problems.

Thanks, -Ben Edmunds @benedmunds

Something went wrong with that request. Please try again.