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]
  • #1171 / Apr 28, 2012 9:51am

    theshiftexchange

    211 posts

    Question regarding passwords + security. My current config:

    $config['hash_method'] = 'bcrypt';  
    $config['default_rounds'] = 8;  
    $config['random_rounds'] = true;
    $config['min_rounds'] = 5;
    $config['max_rounds'] = 9;

    Generates passwords like this:

    $2a$08$pMmzIomXsmPhl8CfXDx7ZebKxTID2We5Sr3tgBNkIw81vJSQfqll.
    $2a$09$tH2Z3gbGrhHaP8VDdD6bD.a5QEzfMxA41BrAsSmQtjkd8YWRqF9Sm
    $2a$07$v0tBBmGO5Ym/AH4mjXikpeMdkHxi2C.W2FKcdP2Xxj12JWPRQ3z3W


    So is the $2a$08 saying that it is bcrypt - and to run 8 rounds on it? And $2a$09 is saying run 9 rounds?

  • #1172 / Apr 30, 2012 5:35pm

    rip_pit

    88 posts

    I would need some advice about a problem i had with my app, ion_auth and firefox
    It often log me out without asking then i sometimes must restart firefox to be able to login again

    Solved, seems to be a know bug in codeigniter database session handling.
    ID is regenerated too fast, it breaks.
    I fixed it by installing CI Native Session and no more random disconnecting 😊 search the forum for more infos 😉

  • #1173 / May 01, 2012 9:20pm

    bill19

    69 posts

    Hi All,

    I’ve got a very basic question ? How do I set up email notifications. In the Ion auth config file I’ve done:

    $config['use_ci_email']= false;
    
     /**
      * Email config - 
      *  'file' = use the default CI config or use from a config file
      *  array = manually set your email config settings
      **/
     $config['email_config']         = array(
      'protocol'=>'smtp',
      'smtp_host'=>'ssl://smtp.googlemail.com', //(SMTP server)
      'smtp_port'=>'465', //(SMTP port)
      'smtp_timeout'=>'30',
      'smtp_user'=>'**********', //(.(JavaScript must be enabled to view this email address))
      'smtp_pass'=>'**********', // (gmail password)
      'mailtype' => 'html',
      'charset' => 'utf-8',
      'newline' => "\r\n",
     );
     
    But Its not working,
    
    Thanks in advance,
    
    Bill
  • #1174 / May 02, 2012 6:27am

    mohsen52

    1 posts

    Hello My friend Ben.

    Thanks you and thanks for your solution,Ion Auth.

    I have used Ion Auth in my project and I want to customize user table but I have not understood yet.
    please show me how to change it or where i can find a proper post in order to solve my problem.

    Thanks for your help.

  • #1175 / May 02, 2012 12:29pm

    bill19

    69 posts

    Hi,

    I have got it working.

    the steps are:

    1) change in application/config/ion_auth.php:

    $config['use_ci_email']= false;
    $config['email_config']         = 'email';

    2) create new config file called email.php, with the following content:

    <?php if (!defined('BASEPATH')) exit('No direct script access allowed');
    
    /*
    | -------------------------------------------------------------------------
    | Email
    | -------------------------------------------------------------------------
    | This file lets you define parameters for sending emails.
    | Please see the user guide for info:
    |
    | <a href="http://ellislab.com/codeigniter/user-guide/libraries/email.html">http://ellislab.com/codeigniter/user-guide/libraries/email.html</a>
    |
    */
    $config['protocol']='smtp';
    
    $config['smtp_host']='ssl://smtp.googlemail.com'; //(SMTP server)
    
    $config['smtp_port']='465'; //(SMTP port)
    
    $config['smtp_timeout']='30';
    
    $config['smtp_user']='[email protected]'; //(.(JavaScript must be enabled to view this email address))
    
    $config['smtp_pass']='qwertyuiop93'; // (gmail password)
    
    
    $config['mailtype'] = 'html';
    $config['charset'] = 'utf-8';
    $config['newline'] = "\r\n";
    
    
    /* End of file email.php */
    /* Location: ./application/config/email.php */

    3) drop it into the application/config folder.

    It should work now,

    Regards,

    Bill

     

  • #1176 / May 03, 2012 1:02am

    gbd_dee

    10 posts

    I downloaded Ion Auth library. I’m very new to codeigniter and need a little guidance using your library. Think of my site as being similar to craigslist.


    I have 4 types of users
    Listers- people who list ads
    Viewers - People who view ads
    One- Time - Listers (They dont have a subscription, they can only post one ad (pay as you go type thingy)
    Admin - activate all of the above

    Question - how do I set up these different users——?

  • #1177 / May 06, 2012 2:23pm

    ReyPM

    86 posts

    Hi Ben, can I use my own tables? I mean I have a PostgreSQL database and this DB can’t be changed so there is a table for users but not for groups and permissions. So any tips?

  • #1178 / May 10, 2012 5:29pm

    SlasHo

    5 posts

    How do I set new groups to a user?

    I’m using this:

    $post_array = array(
                      'username' => 'username_name',
                      'email' => 'the email',
                      'password' => 'passtext',
                      'first_name' => 'name',
                      'last_name' => 'lname',
                      'phone' => '3692587',
                      'group' => Array
                                      ('2','3'));
    
    $this->ion_auth->update($primary_key, $post_array);

     

    but nothing happens. any idea?

  • #1179 / May 11, 2012 9:12am

    Doudleptitfou

    2 posts

    Hi Ben,

    First of all, I wanted to thank you for the great job you have made with Ion Auth. Discovering the possibilites everyday, and I have to admit it helps me a lot with my projects !

    Wanted to point something out though. In your language files, there is a missing tag :

    $lang['login_unsuccessful_not_active'] = '';

    Not sure if it has already pointed out, just wanted to mention it in case.

    Anyway, here is the translation at least for French (since I am) :

    $lang['login_unsuccessful_not_active'] = 'Ce compte est inactif. Veuillez contacter votre administrateur.';

    Hope it helps 😊

  • #1180 / May 11, 2012 9:16am

    Matalina

    191 posts

    How do I set new groups to a user?

    I’m using this:

    $post_array = array(
                      'username' => 'username_name',
                      'email' => 'the email',
                      'password' => 'passtext',
                      'first_name' => 'name',
                      'last_name' => 'lname',
                      'phone' => '3692587',
                      'grupos' => Array
                                      ('2','3'));
    
    $this->ion_auth->update($primary_key, $post_array);

    but nothing happens. any idea?

    you are spelling groups wrong.

     

  • #1181 / May 11, 2012 9:19am

    SlasHo

    5 posts

    How do I set new groups to a user?

    I’m using this:

    $post_array = array(
                      'username' => 'username_name',
                      'email' => 'the email',
                      'password' => 'passtext',
                      'first_name' => 'name',
                      'last_name' => 'lname',
                      'phone' => '3692587',
                      'grupos' => Array
                                      ('2','3'));
    
    $this->ion_auth->update($primary_key, $post_array);

    but nothing happens. any idea?

    you are spelling groups wrong.


    I did corrected, tried: group, groups

    with no results.

  • #1182 / May 23, 2012 4:06am

    nl_vinyl

    7 posts

    I am starting work on an application that will house multiple company’s with multiple users per company.

    Depending on what company they work for and what their rights are different data will be loaded.

    How suitable is Ion Auth for this? Is there an option for this within Ion Auth? Cause I am guessing the groups are ment for different right sets and not for say company separation?

  • #1183 / May 23, 2012 5:00am

    adityamenon

    175 posts

    I am starting work on an application that will house multiple company’s with multiple users per company.

    Depending on what company they work for and what their rights are different data will be loaded.

    How suitable is Ion Auth for this? Is there an option for this within Ion Auth? Cause I am guessing the groups are ment for different right sets and not for say company separation?

    Yeah, it looks like you need another layer of separation on top of the existing groups. I don’t imagine it’s impossible to modify the library and model to make this work.

    In addition, if you’d like a hacky solution, you can make different groups that have the company and rights builtin. It will be unwieldy, but you can get started immediately without modifying anything. Like instead of having two companies, MS and Apple with sub-groups like SysAdmins and Programmers; you’ll have 4 groups MS_SysAdmins, MS_Programmers, Apple_SysAdmins, Apple_Programmers. Like I said, it’s going to be unwieldy, but when things are urgent you gotta do something!

  • #1184 / May 23, 2012 5:53am

    nl_vinyl

    7 posts

    Yeah I was thinking about that too, only was hoping a less “hacky” solution might be possible 😊

  • #1185 / May 23, 2012 4:26pm

    rulin

    18 posts

    If you have only one company per user you could add an extra column to the user table, or even use the existing Company column.
    You’d just need to use something like

    CONO = $this->ion_auth->user()->row()->company

    in any table access.

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

ExpressionEngine News!

#eecms, #events, #releases