CodeIgniter Forums
Ion Auth - Lightweight Auth System based on Redux Auth 2 - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Libraries & Helpers (https://forum.codeigniter.com/forumdisplay.php?fid=22)
+--- Thread: Ion Auth - Lightweight Auth System based on Redux Auth 2 (/showthread.php?tid=27435)



Ion Auth - Lightweight Auth System based on Redux Auth 2 - El Forum - 02-13-2010

[eluser]atno[/eluser]
Hi Ben,

Your auth seems promising, are you able to keep it up to date for the next couple of years?

Thanks a lot for your time mate.
atno


Ion Auth - Lightweight Auth System based on Redux Auth 2 - El Forum - 02-13-2010

[eluser]2think[/eluser]
@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? ;-)

@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.


Ion Auth - Lightweight Auth System based on Redux Auth 2 - El Forum - 02-13-2010

[eluser]Ben Edmunds[/eluser]
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.


Ion Auth - Lightweight Auth System based on Redux Auth 2 - El Forum - 02-18-2010

[eluser]2think[/eluser]
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

Code:
//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?


Ion Auth - Lightweight Auth System based on Redux Auth 2 - El Forum - 02-18-2010

[eluser]Ben Edmunds[/eluser]
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!


Ion Auth - Lightweight Auth System based on Redux Auth 2 - El Forum - 02-20-2010

[eluser]Ki[/eluser]
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?


Ion Auth - Lightweight Auth System based on Redux Auth 2 - El Forum - 02-22-2010

[eluser]Ben Edmunds[/eluser]
samota:

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

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


Ion Auth - Lightweight Auth System based on Redux Auth 2 - El Forum - 02-22-2010

[eluser]Devon Lambert[/eluser]
Hey Ben,

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


Ion Auth - Lightweight Auth System based on Redux Auth 2 - El Forum - 02-22-2010

[eluser]NateL[/eluser]
[quote author="Devon Lambert" date="1266893636"]Are you guys planning to incorporate "Remember Me" functionality into Ion Auth?[/quote]

+1 for that.

I will be trying this out. Thanks for this Smile


Ion Auth - Lightweight Auth System based on Redux Auth 2 - El Forum - 02-22-2010

[eluser]Ben Edmunds[/eluser]
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!