This is the first in a series of articles on the CakePHP Auth component, for me one of the more complicated elements of CakePHP (once you get past the most basic configuration) and one that has taken me ages to work out. Hopefully the information in these guides will go some way to helping you through this process.
Ok, so here are some tricks for debugging the cakePHP auth component in no particular order, they are not a guide to setting up the CakePHP auth component per se so take a look at those for more general set up information:
Debugging the controller and action being requested by the Auth component
in the beforeFilter() of app_controller.php put:
$this->Auth->authError = sprintf(__('You are not authorized to access that location %s/%s .',true),$this->name,$this->action);
This should be alongside your settings for $this->Auth->loginAction and $this->Auth->loginRedirect for example – assuming you have correctly set up your login form to display $session->flash(‘auth’); then it will show you what was rejected by the Auth component.
