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.

Looking for people to give feedback on Community Auth

March 14, 2012 10:42pm

Subscribe [20]
  • #61 / Aug 23, 2012 12:28am

    donhawk

    3 posts

    Hey,
    Thanks a lot guys, I forgot to respond back about the problem I had, luckily after following what Brian said, I was able to register users, send emails, and things are working perfectly as intended except for a few cases on my side.

    Thanks once again for your contributions.

  • #62 / Aug 23, 2012 10:16pm

    RayGarrison

    6 posts

    another bug with the application folder hard-wired to “application” instead of reading the config value: in MY_Email.php, on line 60 you have this:

    // Log email if development environment
     else
     {
      $CI->load->helper('file');
      write_file( FCPATH . 'application/logs/email/' . microtime(TRUE) . '.html', $built_message );
     }

    Again, that’ll fail if the application folder has been moved out of the webroot and renamed something besides “application”

  • #63 / Aug 24, 2012 2:22am

    skunkbad

    1326 posts

    another bug with the application folder hard-wired to “application” instead of reading the config value: in MY_Email.php, on line 60 you have this:

    // Log email if development environment
     else
     {
      $CI->load->helper('file');
      write_file( FCPATH . 'application/logs/email/' . microtime(TRUE) . '.html', $built_message );
     }

    Again, that’ll fail if the application folder has been moved out of the webroot and renamed something besides “application”

    I’ll fix this later tonight when I get to my main work station. I don’t know why I didn’t use APPPATH here. Thanks for the bug report.

  • #64 / Sep 13, 2012 10:35pm

    skunkbad

    1326 posts

    This week I was contacted regarding a problem where somebody had been working on a site built with Community Auth, but once they moved the site to the production server, they could no longer login.

    I went through my normal debugging routine, and found that the hashed password from the database was not matching the hashed password from the login attempt. Because it is easy to tell when a password is hashed using bcrypt, it was easy to see that the production server was not using it. This means the production server was not running PHP 5.3+, but the development server was running PHP 5.3+.

    So this morning I added a new constant, defined in config/constants.php.

    PHP52_COMPATIBLE_PASSWORDS

    Appropriate documentation was added to the configuration page of Community Auth’s documentation, but in short, if you are going to use a development server that is running PHP 5.3+, and the production server will not be PHP 5.3+, setting this constant to 1 will force the development server to hash passwords using PBKDF2.

    I’d like to say thank you again to everyone who has provided feedback.

    UPDATE SEP 15, 2012:

    I’ve done some work on debugging for failed login attempts, and added some documentation on how to debug them. It should be super easy to debug login problems going forward, and if you’ve had problems with Community Auth in the past, perhaps you’ll now be able to figure out why.

    With this work and some I did over the past few weeks, I’ve bumped the version up to 1.4.4. Isolated download is already available on Bitbucket.

  • #65 / Sep 26, 2012 1:24pm

    casiookid

    5 posts

    This project looks really interesting and I would like to give it a spin, but I have been getting this error while trying to install the most recent tip.

    Whenever I click “Run” I get this error:

    Sorry, the following errors occured during the installation procedure:
    No Token Match

    Note that CSRF is turned off in the application/config file.


    I seemed to have run into this error too. I had everything all set up and it was running sweetly until I stupidly, accidentally deleted my database. I re-created the database, created the tables using the db.sql file and ran the init but it won’t create an admin user or import users due to this token error it would seem. I created an admin users straight into the user table but it won’t let me log in using these credentials.

  • #66 / Sep 26, 2012 3:21pm

    skunkbad

    1326 posts

    This project looks really interesting and I would like to give it a spin, but I have been getting this error while trying to install the most recent tip.

    Whenever I click “Run” I get this error:

    Sorry, the following errors occured during the installation procedure:
    No Token Match

    Note that CSRF is turned off in the application/config file.


    I seemed to have run into this error too. I had everything all set up and it was running sweetly until I stupidly, accidentally deleted my database. I re-created the database, created the tables using the db.sql file and ran the init but it won’t create an admin user or import users due to this token error it would seem. I created an admin users straight into the user table but it won’t let me log in using these credentials.

    What have you done to debug? Normally the token is only missing or mismatched if a 404 occurs from a missing resource.

  • #67 / Oct 07, 2012 8:20pm

    skunkbad

    1326 posts

    I just tagged v2.0.0 in the repo. There’s very little in the way of backwards compatibility, unless you went through the commits in the last few days and updated your files. The major difference between v2.0.0 and v1.4.5 is going to be that each role will require their own profile table in the database. This just makes sense, as the profile tables can be completely unique. After getting some advice and thinking about what I want to do with Community Auth, I’ve decided to not create a separate branch or repo for the v2.X code. I barely have time to do anything but work, and maintaining a v1.X branch or repo as a separate project is just not feasible. I know your going to like v2.X anyways. Roles should have been handled this way from the start.

    Coming soon will be a tutorial about adding roles and customizing roles. I want to document the process so it’s super easy to do for anyone. It will be part of the documentation, so it can be updated and become a standard part of Community Auth.

    Have fun ...

  • #68 / Oct 17, 2012 6:45am

    sasa123

    2 posts

    We are major in wholesale and retail products for lady . We sell adults products,shoes,sexy lingerie,uniform,boots,ornaments.
    http://www.mynicekicks.us/

  • #69 / Oct 18, 2012 12:38am

    clhereistian

    3 posts

    First of all, thanks for the awesome library. The user and role stuff is working great for me.

    I am getting a js error when trying to use the custom uploader. In chrome, the error is:

    Uncaught SyntaxError: Unexpected token <

    iIn ajaxupload.js line 618.

    FF says

    SntaxError: XML tag name mismatch (expected img)

    img/logo.png

    also in ajaxupload.js line 618.

    It seems like the javascript uploader is getting sent some html, but notice that the <a> tag is missing the closing slash. The tag is indeed self closed in the template, so I’m not sure how that is happening.


    Thanks in advance.


    EDIT

    I put in production mode, and the js error disappeared. Now it just isn’t working. Any ideas?

  • #70 / Oct 18, 2012 2:00am

    skunkbad

    1326 posts

    First of all, thanks for the awesome library. The user and role stuff is working great for me.

    I am getting a js error when trying to use the custom uploader. In chrome, the error is:

    Uncaught SyntaxError: Unexpected token <

    iIn ajaxupload.js line 618.

    FF says

    SntaxError: XML tag name mismatch (expected img)

    img/logo.png

    also in ajaxupload.js line 618.

    It seems like the javascript uploader is getting sent some html, but notice that the <a> tag is missing the closing slash. The tag is indeed self closed in the template, so I’m not sure how that is happening.


    Thanks in advance.


    EDIT

    I put in production mode, and the js error disappeared. Now it just isn’t working. Any ideas?

    Is the directory where the images are uploaded to writable? Have you made styling changes, or are you still working with the default installation? I just tested the custom uploader at community-auth.com using FF and had no problems. Debugging the ajax uploader file is a bitch. When I get to my computer Ill see if I can give you some instructions that make sense.

  • #71 / Oct 18, 2012 2:29am

    skunkbad

    1326 posts

    First of all, thanks for the awesome library. The user and role stuff is working great for me.

    I am getting a js error when trying to use the custom uploader. In chrome, the error is:

    Uncaught SyntaxError: Unexpected token <

    iIn ajaxupload.js line 618.

    FF says

    SntaxError: XML tag name mismatch (expected img)

    img/logo.png

    also in ajaxupload.js line 618.

    It seems like the javascript uploader is getting sent some html, but notice that the <a> tag is missing the closing slash. The tag is indeed self closed in the template, so I’m not sure how that is happening.


    Thanks in advance.


    EDIT

    I put in production mode, and the js error disappeared. Now it just isn’t working. Any ideas?

    OK. Try to comment out line 618, then check the raw response in your net panel. Youre probably going to see a php error which will give you a clue to what is wrong.

  • #72 / Oct 18, 2012 2:05pm

    clhereistian

    3 posts

    Thanks for replying. I don’t think there is a php error. I get am getting a javascript error when it tries to run the request through eval. Is the request supposed to be a string of dom nodes? If so, which ones? Maybe it is sending the wrong stuff since I have edited the html in all the pages.

    It is also possible I have something wrong in the config files for the uploader. I’m not sure what is expected there. Does this need to be set?

    $config['authentication_custom_uploader']
  • #73 / Oct 18, 2012 6:40pm

    skunkbad

    1326 posts

    Thanks for replying. I don’t think there is a php error. I get am getting a javascript error when it tries to run the request through eval. Is the request supposed to be a string of dom nodes? If so, which ones? Maybe it is sending the wrong stuff since I have edited the html in all the pages.

    It is also possible I have something wrong in the config files for the uploader. I’m not sure what is expected there. Does this need to be set?

    $config['authentication_custom_uploader']

    Yeah, I know you’re getting a php error though, and it’s not passing through the javascript eval. It’s been a while since I had to debug the uploader, but instead of commenting out line 618, try to replace it with:

    console.log〈response〉;

    I promise that once you see the contents of “response” you will know what’s wrong.

    $config[‘authentication_custom_uploader’] is going to need to be set to at least one role, or the custom uploader won’t work. What happens is that when the ajax upload happens, that request sends the user’s cookie back to the server, authenticating the request where the contents of $config[‘authentication_custom_uploader’] is used inside $this->authentication->require_role(). That will fail if $config[‘authentication_custom_uploader’] is not set.

  • #74 / Oct 18, 2012 8:44pm

    clhereistian

    3 posts

    Ahhh - it was the config setting. It is working now. Thanks for your help.

    The custom uploader is a nice feature. I plan on using it as the base for a file upload feature I need.

    Anyhow, maybe you should make an in code comment that the config setting expects a role name. If I want more than one role to have permission to the custom uploader, do I comma separate the role names, like this?

    $config['authentication_custom_uploader'] = 'customer,admin';

    This is my first time using CI, and it seems very straight forward. I really like your auth tool too. Thanks!

  • #75 / Oct 18, 2012 9:11pm

    skunkbad

    1326 posts

    Ahhh - it was the config setting. It is working now. Thanks for your help.

    The custom uploader is a nice feature. I plan on using it as the base for a file upload feature I need.

    Anyhow, maybe you should make an in code comment that the config setting expects a role name. If I want more than one role to have permission to the custom uploader, do I comma separate the role names, like this?

    $config['om_uploader'] = 'customer,admin';

    This is my first time using CI, and it seems very straight forward. I really like your auth tool too. Thanks!

    The default when downloading Community Auth has all roles represented in the config setting, and yes it is just a comma seperated set of roles, like you have shown. You could browse the repo and see what I mean.

    Community Auth really provides a lot of scenarios for authentication, as well as a few bonuses that are just thrown in for fun. It so much more than an authentication library, which is what I originally had in mind. What it has evolved into is more like a project base, and if you learn from it, you’ll be able to use it to get past all of the standard stuff most websites need, enabling you to get to the good stuff, what makes the site unique. Last night I added a reauthentication example. You might find a situation where you want the logged in user to provide their username and password to confirm they really are who they say they are, and the example shows how to do that.

    Anyways, have fun, and let me know how it goes.

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

ExpressionEngine News!

#eecms, #events, #releases