Wednesday, October 26, 2011

CodeIgniter: tank_auth vs. dx_auth


Welcome!
This post is about codeigniter php frameworks's 2 most used authentication systems, tank and dx auth.


Dx_auth was written by Erick Hartanto and it's based on CL Auth 0.2.5 beta developed by Jason Ashdown. Tank_auth is based on dx_auth, it was written by Ilya Konyukhov.

In both of them you can get the basic authentication features such as login, logout, register, and you can also find optionally CAPTCHA (or reCAPTCHA).





So what are the main differences?



In dx_auth there's a simple admin panel, you can create your own roles with custom permissions. However in tank_auth there are no roles and there's no admin panel, but in my opinion it's not a big problem, you can easily write an admin panel or integrate the roles.

If you want to use CI 2.0 or above, as I recognised, dx_auth is not completely compatible, you have to change the class names in each file from Classname to CI_Classname.

If you have to choose between these two, or other auth systems, I advise to use tank_auth. Dx_auth's role system is not very well designed, there can be security issues, and it uses more tables in database for not usable reason (for most of the  times). It's also not a good choice to avoid DoS and bot attacks, since it uses IP restriction instead of username and IP restriction.


If you are intrested, you can read an all-in comparison of all the authentication systems here.

No comments:

Post a Comment