EllisLab text mark
Advanced Search
5 of 6
5
   
Looking for people to give feedback on Community Auth
Posted: 23 August 2012 10:16 PM   [ Ignore ]   [ # 61 ]   [ Rating: 0 ]
Joined: 2010-11-15
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”

 
Posted: 24 August 2012 02:22 AM   [ Ignore ]   [ # 62 ]   [ Rating: 0 ]
Avatar
Joined: 2009-05-17
1415 posts
RayGarrison - 23 August 2012 10:16 PM

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.

 Signature 

Brian
Brian’s Web Design - Temecula
Community Auth - CodeIgniter Authentication Application

 
Posted: 13 September 2012 10:35 PM   [ Ignore ]   [ # 63 ]   [ Rating: 0 ]
Avatar
Joined: 2009-05-17
1415 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.

 Signature 

Brian
Brian’s Web Design - Temecula
Community Auth - CodeIgniter Authentication Application

 
Posted: 26 September 2012 01:24 PM   [ Ignore ]   [ # 64 ]   [ Rating: 0 ]
Joined: 2012-09-19
6 posts
Ephyzy - 26 June 2012 10:26 PM

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:

Sorrythe 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.

 
Posted: 26 September 2012 03:21 PM   [ Ignore ]   [ # 65 ]   [ Rating: 0 ]
Avatar
Joined: 2009-05-17
1415 posts
casiookid - 26 September 2012 01:24 PM
Ephyzy - 26 June 2012 10:26 PM

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:

Sorrythe 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.

 Signature 

Brian
Brian’s Web Design - Temecula
Community Auth - CodeIgniter Authentication Application

 
Posted: 07 October 2012 08:20 PM   [ Ignore ]   [ # 66 ]   [ Rating: 0 ]
Avatar
Joined: 2009-05-17
1415 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 ...

 Signature 

Brian
Brian’s Web Design - Temecula
Community Auth - CodeIgniter Authentication Application

 
Posted: 17 October 2012 06:45 AM   [ Ignore ]   [ # 67 ]   [ Rating: 0 ]
Joined: 2012-10-17
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/

 
Posted: 18 October 2012 12:38 AM   [ Ignore ]   [ # 68 ]   [ Rating: 0 ]
Joined: 2012-10-17
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?

 
Posted: 18 October 2012 02:00 AM   [ Ignore ]   [ # 69 ]   [ Rating: 0 ]
Avatar
Joined: 2009-05-17
1415 posts
clhereistian - 18 October 2012 12:38 AM

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.

 Signature 

Brian
Brian’s Web Design - Temecula
Community Auth - CodeIgniter Authentication Application

 
Posted: 18 October 2012 02:29 AM   [ Ignore ]   [ # 70 ]   [ Rating: 0 ]
Avatar
Joined: 2009-05-17
1415 posts
clhereistian - 18 October 2012 12:38 AM

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.

 Signature 

Brian
Brian’s Web Design - Temecula
Community Auth - CodeIgniter Authentication Application

 
Posted: 18 October 2012 02:05 PM   [ Ignore ]   [ # 71 ]   [ Rating: 0 ]
Joined: 2012-10-17
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'
 
Posted: 18 October 2012 06:40 PM   [ Ignore ]   [ # 72 ]   [ Rating: 0 ]
Avatar
Joined: 2009-05-17
1415 posts
clhereistian - 18 October 2012 02:05 PM

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.

 Signature 

Brian
Brian’s Web Design - Temecula
Community Auth - CodeIgniter Authentication Application

 
Posted: 18 October 2012 08:44 PM   [ Ignore ]   [ # 73 ]   [ Rating: 0 ]
Joined: 2012-10-17
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!

 
Posted: 18 October 2012 09:11 PM   [ Ignore ]   [ # 74 ]   [ Rating: 0 ]
Avatar
Joined: 2009-05-17
1415 posts
clhereistian - 18 October 2012 08:44 PM

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.

 Signature 

Brian
Brian’s Web Design - Temecula
Community Auth - CodeIgniter Authentication Application

 
Posted: 19 October 2012 10:52 AM   [ Ignore ]   [ # 75 ]   [ Rating: 0 ]
Avatar
Joined: 2012-02-24
54 posts

Hi! I’ve successfuly installed Community Auth before a few months but wasn’t using it. Today I’ve installed the new version (2.0.0). It’s excellent, and I’d like to integrate it with my existing CodeIgniter website which has three columns layout and only one controller (Site). I don’t know how to merge it with 12 Community Auth controllers… Thanks!

<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class 
Site extends CI_Controller {

    
public function index(){
        $this
->home();
    
}

    
public function home(){
        $this
->load->model("model_get");
        
$data["results"$this->model_get->getData("home");
        
$this->load->view("site_header");
        
$this->load->view("content_home"$data); //col1, centered
        
$this->load->view("col2");
        
$this->load->view("col3");
        
$this->load->view("site_banner");
        
$this->load->view("site_footer");
    
 
5 of 6
5