CodeIgniter Forums
DataMapper 1.8.2 (handling logins) - 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: DataMapper 1.8.2 (handling logins) (/showthread.php?tid=53872)



DataMapper 1.8.2 (handling logins) - El Forum - 08-12-2012

[eluser]shenanigans01[/eluser]
Hello, I'm using datamapper(1.8.2) for some projects I'm working on, all of which will require a login function. I've noticed that it does come with an example application that has a library for handling logins which can also be seen here: DataMapper Login

My question: is this example up-to date? Is there a better way to handle logins using datamapper? Or would anyone have a better example / library for public use. As far as activation,signup, etc I have that taken care of but I want to make sure I'm using best practices for session, cookies, logins, etc. Thanks for your time Smile




DataMapper 1.8.2 (handling logins) - El Forum - 08-12-2012

[eluser]WanWizard[/eluser]
Depends on your definition of 'up to date'.

The example application has been included with DM since I think v1.7, and I've kept it updated with later releases.

It's also built on best practices (it for example uses a per-user salt for the password) although I would today replace sha1() by something like bcrypt() or pbkdf2(), but both are not available in a standard environment and therefore not suitable for an example.

It uses CI for sessions and cookies, so those are as good as what CI code and your configuration.


DataMapper 1.8.2 (handling logins) - El Forum - 08-14-2012

[eluser]CI-Newb[/eluser]
@WanWizard:

Thank you very much for your prompt reply! I look forward to working with datamapper more! It's been a invaluable tool thus far!