Welcome Guest, Not a member yet? Register   Sign In
Community Auth: Login errors
#1

I have an existing CI 3.0.6 application that I'm trying to integrate CA into. I've followed the CA installation instructions and was able to create an example user. I'm using the Example controller from CA.

When I try to login I get the following error:
Login Error #3/5: Invalid Username, Email Address, or Password.

Username, email address and password are all case sensitive.

I've copied/pasted the credentials from the create_user() function so I know they are correct.

CI Log File:
INFO - 2016-07-23 20:57:15 --> Config Class Initialized

INFO - 2016-07-23 20:57:15 --> Hooks Class Initialized
DEBUG - 2016-07-23 20:57:15 --> UTF-8 Support Enabled
INFO - 2016-07-23 20:57:15 --> Utf8 Class Initialized
INFO - 2016-07-23 20:57:15 --> URI Class Initialized
INFO - 2016-07-23 20:57:15 --> Router Class Initialized
INFO - 2016-07-23 20:57:15 --> Output Class Initialized
INFO - 2016-07-23 20:57:15 --> Security Class Initialized
DEBUG - 2016-07-23 20:57:15 --> Global POST, GET and COOKIE data sanitized
INFO - 2016-07-23 20:57:15 --> Input Class Initialized
INFO - 2016-07-23 20:57:15 --> Language Class Initialized
INFO - 2016-07-23 20:57:15 --> Loader Class Initialized
DEBUG - 2016-07-23 20:57:15 --> Config file loaded: /project/application/third_party/community_auth/config/db_tables.php
DEBUG - 2016-07-23 20:57:15 --> Config file loaded: /project/application/third_party/community_auth/config/authentication.php
INFO - 2016-07-23 20:57:15 --> Helper loaded: url_helper
INFO - 2016-07-23 20:57:15 --> Helper loaded: file_helper
INFO - 2016-07-23 20:57:15 --> Helper loaded: date_helper
INFO - 2016-07-23 20:57:15 --> Helper loaded: string_helper
INFO - 2016-07-23 20:57:15 --> Helper loaded: misc_helper
INFO - 2016-07-23 20:57:15 --> Helper loaded: datetime_helper
INFO - 2016-07-23 20:57:15 --> Helper loaded: javascript_helper
INFO - 2016-07-23 20:57:15 --> Helper loaded: serialization_helper
INFO - 2016-07-23 20:57:15 --> Helper loaded: cookie_helper
INFO - 2016-07-23 20:57:15 --> Database Driver Class Initialized
INFO - 2016-07-23 20:57:15 --> Session: Class initialized using 'files' driver.
DEBUG - 2016-07-23 20:57:15 --> Encryption: Auto-configured driver 'openssl'.
INFO - 2016-07-23 20:57:15 --> Encryption: OpenSSL initialized with method AES-128-CBC.
INFO - 2016-07-23 20:57:15 --> Encryption Class Initialized
INFO - 2016-07-23 20:57:15 --> Model Class Initialized
INFO - 2016-07-23 20:57:15 --> Model Class Initialized
INFO - 2016-07-23 20:57:15 --> Model Class Initialized
INFO - 2016-07-23 20:57:15 --> Controller Class Initialized
INFO - 2016-07-23 20:57:15 --> Helper loaded: form_helper
DEBUG - 2016-07-23 20:57:15 --> 
 string     = skunkbot
 password   = PepeLePew7
 form_token = 
 token_jar  = []
INFO - 2016-07-23 20:57:15 --> File loaded: /project/application/third_party/community_auth/views/examples/page_header.php
INFO - 2016-07-23 20:57:15 --> File loaded: /project/application/third_party/community_auth/views/examples/login_form.php
INFO - 2016-07-23 20:57:15 --> File loaded: /project/application/third_party/community_auth/views/examples/page_footer.php
INFO - 2016-07-23 20:57:15 --> Final output sent to browser
DEBUG - 2016-07-23 20:57:15 --> Total execution time: 0.0579



This is my first time trying to use Community Auth.

Anyone have some ideas?
Reply
#2

Did you set the user level to 9 when you created the user?
Reply
#3

(07-23-2016, 07:39 PM)skunkbad Wrote: Did you set the user level to 9 when you created the user?

Yes. Just checked the DB to confirm.
Reply
#4

Notice these lines:

Code:
DEBUG - 2016-07-23 20:57:15 --> 
 string     = skunkbot
 password   = PepeLePew7
 form_token = 
 token_jar  = []

This would indicate that the form token was not posted, and even if it was you did not have any form tokens set in a tokens cookie. Have you made any customizations or anything?
Reply
#5

(This post was last modified: 07-24-2016, 07:10 AM by rexinthecity. Edit Reason: Adding more info. )

(07-23-2016, 10:58 PM)skunkbad Wrote: Notice these lines:

Code:
DEBUG - 2016-07-23 20:57:15 --> 
 string     = skunkbot
 password   = PepeLePew7
 form_token = 
 token_jar  = []

This would indicate that the form token was not posted, and even if it was you did not have any form tokens set in a tokens cookie. Have you made any customizations or anything?

I haven't made any changes to CA files. This is an old CI 1.7 project that I've taken over and upgraded to 3.0.6 in the past couple weeks. I haven't seen any old code that looks like it would interfere with any of this.

Where do the tokens come in to play with the form? I don't see them in examples/login_form.php
Reply
#6

CA comes with a form helper that injects the token into the form as a hidden field. During install, point #2 advises to copy this helper over to your application, and merge changes in the event of an existing helper. So, take a look at the form_open function.

See here: http://community-auth.com/documentation/...-functions
Reply
#7

That was the breadcrumb I needed. Turns out the previous developer decided to change subclass_prefix from the default so none of the MY_ files were being loaded.
Reply
#8

Glad you got it working.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB