Part of the EllisLab Network
   
 
Freakauth_light recoded + remember me functionality
Posted: 18 August 2010 12:47 PM   [ Ignore ]  
Summer Student
Total Posts:  25
Joined  07-28-2010

I recently found the version of freakauth_light recoded to work with CI 1.7+ and like it a lot, but it doesn’t have any remember me functionality. So I added it. smile

The attached zip has the only the files needed to convert that version of freakauth_light to use the remember me functionality. Copy them over the original FreakAuth Light Recoded files and run user_persistence.sql to enabled Remember Me functionality.

The full FreakAuth Light Recoded + Remember Me is too large to attach to the forums. It can be downloaded here. In it are instructions for installation (installation_instructions.txt) and instructions for enabling remember me functionality (Enabling User Persistence.txt).


The basic flow of User Persistence and the changes that were made:
1) autoload the user_persistence library
2) add a parameter to login() to let us know if it’s a forced login due to a cookie error so the user can be told.
3) move the random string generation to a helper so it can be used for the cookies
4) add an error message to display when there is a cookie sync problem
5) add a remember me checkbox to the login form
6) if the box is checked at login, persist the user
7) erase their persistence at logout
8) cookie creation / processing is handled as described in bjaspan’s Improved Persistent Login Cookie Best Practice. While it might not be perfectly secure (remember me can’t be), this functionality is not intended for ecommerce, so it should be good enough.

File Attachments
freakauth_light_recoded_plus_remember_me.zip  (File Size: 37KB - Downloads: 136)
Profile
 
 
Posted: 19 August 2010 03:31 PM   [ Ignore ]   [ # 1 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  174
Joined  07-14-2007

Can you package all into one zip.

Also, can you create an upgrade documentation from the original freak_auth_light lib to yours with all the bells and whistles.

 Signature 

Hell Horror - CodeIgniter Community for Horror Fans

Profile
 
 
Posted: 19 August 2010 03:40 PM   [ Ignore ]   [ # 2 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  174
Joined  07-14-2007

Where is the sql for the user_persistence table. Can you explain this a little more.

Also did you fix the Db_sessions multiple update issue? I have an updated version if you would like to take a look.

 Signature 

Hell Horror - CodeIgniter Community for Horror Fans

Profile
 
 
Posted: 20 August 2010 12:20 PM   [ Ignore ]   [ # 3 ]  
Summer Student
Total Posts:  25
Joined  07-28-2010
RaZoR LeGaCy - 19 August 2010 07:31 PM

Can you package all into one zip.

Done and linked to in the first post (it was too large to attach).

RaZoR LeGaCy - 19 August 2010 07:31 PM

Also, can you create an upgrade documentation from the original freak_auth_light lib to yours with all the bells and whistles.

The zip has all of the changes needed, though I need to point out that this isn’t based off of the original frak_auth_light, but rather a recoded version found here.

The installation instructions for that add-on are included in this expansion as installation_instructions.txt. Instructions for adding remember me functionality are included as Enabling User Persistence.txt. I don’t know if there’s an easy way to upgrade from the original freak_auth_light to the recoded version, and hence to this version.

RaZoR LeGaCy - 19 August 2010 07:40 PM

Where is the sql for the user_persistence table. Can you explain this a little more.

Sorry, I edited the first post to add it but it looks like it didn’t stick. It’s now in both zip files as user_persistence.sql.

RaZoR LeGaCy - 19 August 2010 07:40 PM

Also did you fix the Db_sessions multiple update issue? I have an updated version if you would like to take a look.

I didn’t know there was one. smile I’m pretty new to freak_auth specifically, and codeigniter in general. What’s the bug and how do I fix it? smile

Profile