Welcome Guest, Not a member yet? Register   Sign In
Ion Auth - Lightweight Auth System based on Redux Auth 2

[eluser]Ivan Awe-Inspiring[/eluser]
Bump! Anyone that could answer this?

Thanks in advance.

[quote author="Ivan Awe-Inspiring" date="1299556456"]Hi guys,

Is there a way to change login with method on the fly? For example my app has only email login, but I want to enable users to login with their username as well. Is there any known way or I have to hack through the ion auth code to make this work?

Thanks in advance.[/quote]

[eluser]Ben Edmunds[/eluser]
Swissv2 bullspit,

That was just put there as an example, you'll need to finish it for your needs.

[eluser]Swissv2[/eluser]
Thanks for the reply Ben.

Ok, made the video my base installation process from scratch...Please correct me if I have made a mistake during this installation. As you can see, I seem to be able to set it up, login to the application, successfully logout, etc. When I add a new user, it doesn't add a few variables into the database (shown in the video), logging out and logging back in makes it go into a loop.

There were a few updated installation process I read within this thread, so I would love for someone to get a demonstration video about what the correct installation process should be.

Video Link: http://www.youtube.com/watch?v=amqmhKf4xs4

[eluser]Ben Edmunds[/eluser]
Swissv2,

Looks good dude. Really could use voice commentary though.

The IP address isn't set because of your server setup, usually this doesn't come through with local development.

The salt isn't set because by default Ion Auth is not set to use stored salts, you can change this in the config if needed.


I'm not sure what to tell you about the redirect loop, have you troubleshot this at all?

[eluser]cavijayan[/eluser]
Swissv2,

Redirect Loop is because you set default controller to auth, which can only be accessed by admin users.

Normal user can only login using auth controller, then they will be redirected to base_url. Since you set default controller to auth, they are in a indefinite loop.

I hope this helps you.

[eluser]Frank Rocco[/eluser]
Is there an easy want to have users request a new password and have it emailed?
The forgot_password is not working in godaddy website.

I want to:
1. Generate password
2. update users current password with new one.
3. email new password
4. after login, force them to change password.

Thanks

Update:

This is the message I am getting back from godaddy.

The original message was received at Wed, 9 Mar 2011 08:46:56 -0700
from localhost.localdomain [127.0.0.1]

----- The following addresses had permanent fatal errors -----
<[email protected]>
(reason: 553 sorry, your mail was administratively denied. (#5.7.1))

[eluser]RJ[/eluser]
@Ben scratch my github question, answered here. thanks

[eluser]Swissv2[/eluser]
cavijayan,

Thanks for your input. I see the code line (around line 31) in 'auth.php' redirecting a "general user" to the base_url definition in 'config.php' though I noticed when logging in as an administrator, the view 'auth/index' was not loaded properly.

I haven't quite figured out how to fix the load view issue (auth.php - index() function on the else statement)


Currently;

If I set the default controller to "auth",
- when logging in as an administrator I see the user list,
- but as a general user, the loop is infinite.

If I set the default controller to "welcome",
- when logging in as an administrator, the administrator can only see the "welcome" page.
- logging in as a general user gets redirected to welcome.

[eluser]skypanther[/eluser]
Sorry if I missed this in the docs, but how do you create groups? I don't see methods for that.

[eluser]Wayne Smallman[/eluser]
OK, thanks to Ben Edmonds, I've now got CodeIgniter Reactor, Ion Auth and Modular Extensions working.

What I must stress is, having spent some time searching various threads on this subject, Ben made changes to my clean install of the aforementioned that I have not been able to find documented elsewhere — irrespective of what other users may have claimed previously, this is not as straight forward as has been suggested.

So if you were stuck on the same way I was, the following might just be the definitive solution for you as it has been for myself.

Here is a series of instructions, based on earlier instructions, which I've amended to make more accurate, to help clarify certain instructions, and to include the additions made by Ben:

1. Download the latest version of CodeIgniter.

2. Extract, and then make sure it is running, by configuring the: "application/config/config.php" file.

3. Download the latest version of Modular Extension

4. Install and copy MY_Loader & MY_Router to "application/core", and the "MX" directory to "application/third_party" directory.

5. Download the latest version of Ion_Auth.

6. Install the SQL.

7. Place the entire "auth" directory itself into the "modules" directory as-is.

8. Add a route into "application/config/routes.php":
Code:
$route['auth/(.*)'] = 'users/auth/$1';

9. Add auto-load items to the "application/config/autoload.php" file:
Code:
$autoload['libraries'] = array('database','session');

10. Edit the following paths in the: "application/modules/auth/libraries/Ion_auth.php" file:
Code:
$this->ci->load->config('auth/ion_auth', TRUE);
$this->ci->load->library('email');
$this->ci->load->library('session');
$this->ci->lang->load('auth/ion_auth');
$this->ci->load->model('auth/ion_auth_model');

11. Changed the "application/modules/auth/controllers/auth.php" controller to extend "application/core/MY_Controller.php" library, which in turn extends the "application/third_party/Controller.php" MX_Controller file.

12. Edit your MY_Controller file to reflect the following:
Code:
&lt;?php (defined('BASEPATH')) OR exit('No direct script access allowed');

/* load the MX_Router class */
require APPPATH."third_party/MX/Controller.php";

class MY_Controller extends MX_Controller
{
    function __construct()
    {
        parent::__construct();
        
        $this->load->database();
        $this->load->library('session');
        $this->load->library('form_validation');
        $this->load->helper('url');
        $this->load->library('auth/ion_auth');
    }
}

You may change the name of the "auth" directory, but be sure to reflect this name change in points 8, 10 and 12.

If you spot any mistakes in the above, please let me know and I'll make the required changes.

Hopefully, you're good to go!




Theme © iAndrew 2016 - Forum software by © MyBB