Part of the EllisLab Network
   
2 of 118
2
Ion Auth - Lightweight Auth System based on Redux Auth 2
Posted: 13 February 2010 05:19 PM   [ Ignore ]   [ # 11 ]  
Lab Assistant
RankRank
Total Posts:  128
Joined  01-18-2008

@atno,
It would be great if Ben could predict those next couple years - not just for himself but can you imagine what that would do for Codeigniter itself?  wink

@Markko,
Check out his controllers in the download sample and the library code itself. Documentation would be great but the code really is extremely well written with comments.

Profile
 
 
Posted: 13 February 2010 10:20 PM   [ Ignore ]   [ # 12 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  884
Joined  07-26-2009

Markko,

I’m really bad about documentation so I tried to make the code easy to understand and build a comprehensive demo.


If you have questions or need additional support feel free to email me.


atno,

I definitely plan to continue supporting it.  If something ever comes up where I can’t I’ll pass it off to someone else so don’t worry about losing support.

 Signature 

BenEdmunds.com

Contact Me:                                    My Code: 

  ben.edmunds@gmail.com            Github
  @benedmunds

Profile
 
 
Posted: 18 February 2010 09:36 PM   [ Ignore ]   [ # 13 ]  
Lab Assistant
RankRank
Total Posts:  128
Joined  01-18-2008

Ben,

Great library/solution. After updating to your most recent code on Github (commit_id: 18e39bd1), I noticed after login that I was redirected to http://my.domain.com// (<—-notice the extra slash).

The base_url in my config is a sub-domain, don’t know if that mattered any but doubt it.

Anyway, I switched my code in the app/controllers/auth.php to the following:

...controllers/auth.php

//log the user in
    
function login()
    
{
        $this
->data['title'"Login";
        
$redirect_uri_successful_login $this->config->item('base_url',TRUE);

        
//validate form input
        
$this->form_validation->set_rules('email''Email Address''required|valid_email');
        
$this->form_validation->set_rules('password''Password''required');

        if (
$this->form_validation->run() == true//check to see if the user is logging in
            
if ($this->ion_auth->login($this->input->post('email'), $this->input->post('password'))) //if the login is successful
                //redirect them back to the home page
                
$this->session->set_flashdata('message'"Logged In Successfully");
                
redirect($redirect_uri_successful_login'refresh');

... 

I’m thinking you could set this in your ion_auth.php in the config folder?

Profile
 
 
Posted: 18 February 2010 10:16 PM   [ Ignore ]   [ # 14 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  884
Joined  07-26-2009

Thanks for pointing that out 2think.

The controller is just example code so feel free to modify it as much as needed.  I went ahead and pushed a change to use base_url instead of ‘/’ in the home page redirects.


Thanks!

 Signature 

BenEdmunds.com

Contact Me:                                    My Code: 

  ben.edmunds@gmail.com            Github
  @benedmunds

Profile
 
 
Posted: 20 February 2010 07:24 AM   [ Ignore ]   [ # 15 ]  
Grad Student
Avatar
Rank
Total Posts:  97
Joined  04-14-2009

Hi,
I have user redux_auth with extensive customisation that I did myself. Particularly:
1) Added the ability to login with email OR username
2) Introduced error messages, such as “Incorrect username/password”

Will this library support the above mentioned features?

 Signature 

My CI 2.0 Libraries on key2market.com
zoolt.co.uk
zoolt.net
zoolt.com
zoolt.ca
zoolt.ru
Looking for partners

Profile
 
 
Posted: 22 February 2010 04:39 PM   [ Ignore ]   [ # 16 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  884
Joined  07-26-2009

samota:

Currently Ion Auth supports your #1 but not #2. 

Adding multi-lingual error messages is on the to-do list though.

 Signature 

BenEdmunds.com

Contact Me:                                    My Code: 

  ben.edmunds@gmail.com            Github
  @benedmunds

Profile
 
 
Posted: 22 February 2010 04:53 PM   [ Ignore ]   [ # 17 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  168
Joined  05-04-2008

Hey Ben,

Got the 411 on Ion Auth from Phil. Are you guys planning to incorporate “Remember Me” functionality into Ion Auth?

 Signature 

Reality Knights - Have more fun

Profile
 
 
Posted: 22 February 2010 05:03 PM   [ Ignore ]   [ # 18 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  315
Joined  08-29-2008
Devon Lambert - 22 February 2010 09:53 PM

Are you guys planning to incorporate “Remember Me” functionality into Ion Auth?

+1 for that.

I will be trying this out. Thanks for this smile

 Signature 

CodeIgniter From Scratch: Day 1 | Day 2 | Day 3 | Day 4 | Day 5 | Day 6 | Day 7

Profile
 
 
Posted: 22 February 2010 05:17 PM   [ Ignore ]   [ # 19 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  884
Joined  07-26-2009

Devon/NateL:

I’ve had one other person request this and I was waiting to see if there were many requests for this feature.


I’ll add it to the to-do list.


Thanks!

 Signature 

BenEdmunds.com

Contact Me:                                    My Code: 

  ben.edmunds@gmail.com            Github
  @benedmunds

Profile
 
 
Posted: 23 February 2010 12:05 AM   [ Ignore ]   [ # 20 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  315
Joined  08-29-2008

Hey Ben,

This returned the full path, as I expect it:

if(!is_really_writable(dirname(__FILE__))): 
 Signature 

CodeIgniter From Scratch: Day 1 | Day 2 | Day 3 | Day 4 | Day 5 | Day 6 | Day 7

Profile
 
 
   
2 of 118
2