ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Ion Auth - Lightweight Auth System based on Redux Auth 2

February 10, 2010 7:00pm

Subscribe [287]
  • #796 / Mar 08, 2011 6:41am

    wiredesignz

    2882 posts

    @Wayne Smallman, it does work. First off, don’t autoload the Ion_Auth library from a module. And perhaps if you post your controller code it might help others to diagnose your problem.

  • #797 / Mar 08, 2011 7:19am

    Wayne Smallman

    176 posts

    @Wayne Smallman, it does work. First off, don’t autoload the Ion_Auth library from a module. And perhaps if you post your controller code it might help others to diagnose your problem.

    I have no doubt that all of this works, because enough people appear to be using it.

    However, as you know from our earlier conversations from elsewhere on this forum, you yourself flatly refused to assist me in getting Ion Auth and your own software to work together — which is why I’m now here, seeking further assistance.

    I’ve read through every piece of documentation I can find, I’ve tried all of the methods described and all have failed in exactly the same way, in exactly the same places. The errors are the only thing that work consistently.

    All of what I’ve attempted has been posted previously. I can, if required, bundle the whole project up and upload it somewhere so you can sift through what I’ve done.

  • #798 / Mar 08, 2011 7:30am

    wiredesignz

    2882 posts

    I am trying to help now so post your controller code.

  • #799 / Mar 08, 2011 2:49pm

    Swissv2

    4 posts

    After sifting through this forum thread, it would be great for someone to post an updated video on the proper setup of Ion Auth, preferably those who really know all the caveats of the program.

    I have setup the system, got it to run to a certain extent, but unable to access a few sections, including “edit_user”. I will release a video of me setting up Ion_Auth in a little while along with screenshots to show what exactly is happening on my end.

  • #800 / Mar 08, 2011 3:57pm

    RJ

    179 posts

    @swissv2 - The edit user view is looking for an admin/edit_user method.  The admin controller wasn’t included in my ion_auth download.  Maybe Ben can chime in here…

  • #801 / Mar 08, 2011 4:44pm

    Bump! Anyone that could answer this?

    Thanks in advance.

    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.

  • #802 / Mar 08, 2011 5:21pm

    Ben Edmunds

    812 posts

    Swissv2 bullspit,

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

  • #803 / Mar 08, 2011 7:19pm

    Swissv2

    4 posts

    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

  • #804 / Mar 09, 2011 1:54am

    Ben Edmunds

    812 posts

    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?

  • #805 / Mar 09, 2011 3:53am

    cavijayan

    3 posts

    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.

  • #806 / Mar 09, 2011 11:52am

    Frank Rocco

    109 posts

    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))

  • #807 / Mar 09, 2011 12:19pm

    RJ

    179 posts

    @ben scratch my github question, answered here.  thanks

  • #808 / Mar 09, 2011 12:49pm

    Swissv2

    4 posts

    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.

  • #809 / Mar 09, 2011 12:59pm

    skypanther

    5 posts

    Sorry if I missed this in the docs, but how do you create groups? I don’t see methods for that.

  • #810 / Mar 10, 2011 9:52am

    Wayne Smallman

    176 posts

    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”:

    $route['auth/(.*)'] = 'users/auth/$1';

    9. Add auto-load items to the “application/config/autoload.php” file:

    $autoload['libraries'] = array('database','session');

    10. Edit the following paths in the: “application/modules/auth/libraries/Ion_auth.php” file:

    $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:

    <?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!

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases