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]
  • #1006 / Jul 21, 2011 4:27pm

    Citizen

    23 posts

    One small suggestion: you might to include the adding of ion tables as part of the installation portion of the user guide. The problem with just running ion_auth.sql through phpmyadmin is that it doesn’t add your CI table prefix.

    Since Ben is so busy, I decided to make a few quick edits to the pre-existing sql to include prefixes and I’ll attempt to make a few edits to the library to let it utilize prefixes using a configuration key.

    Wouldn’t it make more sense to create an install controller using CI’s Database Forge Class?

    http://ellislab.com/codeigniter/user-guide/database/forge.html

    Then, we woudn’t have to worry about having a separate .sql file for postgre vs mysql vs mssql since it uses the CI db abstraction layer.

  • #1007 / Jul 21, 2011 4:42pm

    Ben Edmunds

    812 posts

    Personally I don’t think it’s worth the trouble to make an installer.

    Ion Auth is a library that programmers integrate into their projects to assist them with building out their authentication.  It’s not meant to be something that non-programmers can just drop-in.


    Thanks though!

  • #1008 / Jul 21, 2011 4:47pm

    austintbiggs

    40 posts

    I’d recommend putting that in the meta table; that’s a perfect use case for the meta table.

    and putting preferences in there won’t slow down authentication right?

  • #1009 / Jul 21, 2011 4:49pm

    Ben Edmunds

    812 posts

    austintbiggs,

    As long as you don’t add a table (just use the meta table) it won’t add any measurable performance decrease.

    If you add another table it will slow it down a little because you have to join an additional table.

  • #1010 / Jul 25, 2011 4:22pm

    gmoore

    6 posts

    Hey Ben, et al

    I’m hoping to use Ion Auth for a Codeigniter application, but I’m unsure of exactly how to structure the tables appropriately.  Basically, I have a few different types of users each with different attributes.  How would one build this out with just a single meta table?

    Some ideas were offered here ( http://stackoverflow.com/questions/6240059/create-user-roles-and-profiles-in-codeigniter-using-ion-auth ) but none seem particularly elegant or ideal.  Is there a a better way?  Can I easily work with multiple meta tables (e.g. meta_type1, meta_type2, etc.) somehow?

    A related issue pertains to the “identity” config parameter for login etc.  How could I have the identity be email for one user type, and username for another?

    Thanks in advance for any tips/advice/ideas.  I’m interested to hear what you think Ben, but also what others have done to build in this kind of functionality.

  • #1011 / Jul 25, 2011 4:30pm

    ssyberg

    2 posts

    I’m having a little trouble seeing the benefit of the meta table.  If I understand this correctly, the meta and users table have a 1:1 relationship.  Per group meta tables make sense since there are often group specific fields (basic sub/super type relationship), but it’s my understanding that this is not the intended use with Ion_Auth.  Can someone explain the motivation behind the meta table (and perhaps add more information on the meta table to the documentation)?

    Thanks!

  • #1012 / Jul 26, 2011 5:00am

    DirkZz

    15 posts

    supports ion auth multiple groups per user?

    cusaro

    Same question for me.

  • #1013 / Jul 26, 2011 5:04am

    joytopia

    76 posts

    supports ion auth multiple groups per user?

    cusaro

    Same question for me.

    I think, version 2 does, but is still alpha.


    @Ben,
    when do you think that Ion Auth 2 will be stable enough for production use?

    Best regards
    Bernd

  • #1014 / Jul 26, 2011 5:45pm

    Ben Edmunds

    812 posts

    Bernd is correct, v2 supports that.

    Bernd,
    I’m really not sure, I haven’t received many bug reports so it may be more stable than I think.  I will probably switch it to be master soon so it is the main library people use in order to force more testing.

  • #1015 / Jul 27, 2011 5:15am

    joytopia

    76 posts

    Ben, do you use Version 2 already in Pyro CMS?

  • #1016 / Jul 27, 2011 5:39am

    ηυмвєяσηє

    109 posts

    login errors doesnt show in V2. Messages and errors are needed to be checked.

    ion_auth_model, line 719 :

    $this->set_message('login_unsuccessful');

    auth.php, line 71-73 :

    { //if the login was un-successful
    //redirect them back to the login page
    $this->session->set_flashdata('message', $this->ion_auth->errors());

    Regards,
    Yusuf

  • #1017 / Jul 27, 2011 9:16am

    Vamsii

    17 posts

    I am using this awesome Auth library for a while and I love this..
    but I dont like the part when it generates usernames on its own when its already taken.
    Like : username1 . username2 . etc
    This can be annoying for some users who register with a name in mind and will see username1 etc…

    Thanks ..

  • #1018 / Jul 27, 2011 11:20am

    tropiburguer

    1 posts

    I’m getting an mysql syntax error on the ion auth mysql install file on line 2 (see message below), any idea why?

    Message:

    Error Number: 1064

    You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘WHERE `0` = ‘[email protected]’’ at line 2

    SELECT COUNT(*) AS `numrows` WHERE `0` = ‘[email protected]

  • #1019 / Jul 27, 2011 12:08pm

    eddt

    3 posts

    I’m getting an mysql syntax error on the ion auth mysql install file on line 2 (see message below), any idea why?

    Message:

    Error Number: 1064

    You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘WHERE `0` = ‘[email protected]’’ at line 2

    SELECT COUNT(*) AS `numrows` WHERE `0` = ‘[email protected]

    Looking at the ion_auth.sql file from what I think is the most recent version available from Ben’s site, there’s not a single “SELECT” in the sql file - its all “CREATE” and “INSERTS” to setup the tables you’ll need in the DB. So I don’t know what .sql script you’ve got, but I don’t think it is the install script!

  • #1020 / Jul 29, 2011 9:19pm

    Ben Edmunds

    812 posts

    Bernd,
    No, PyroCMS isn’t using v2 yet.


    Yusuf,
    Please post bugs and pull requests in github, they tend to get lost in all the noise here, thanks!

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

ExpressionEngine News!

#eecms, #events, #releases