Debugging the CakePHP Auth Component

This article is over a year old and may contain outdated information.

Finally, I figured it out. For the past 2 days I have been messing with the CakePHP AuthComponent (A prebuilt user login and authentication system). The problem was that it would not log in, even though I was entering correct data from the database. I spent many hours and even posted on the Google CakePHP Discussion group. Even with their help it still would not work, but I found the problem!

CakePHP comes with a password salt feature that automatically salts and encrypts any index called "password" within an array. The problem was that the previous passwords in the database were not encrypted with a salt, so hence the passwords never matched! Once I made the Cake salt empty, it worked in all its glory. I will be posting up a tutorial this week on how to use the AuthComponent, for anyone who was as lost as me trying to get it working.

2 Comments