Description: By default, CakePHP authentication is applied to all application controllers. So it does not allow users to perform any of the action without login.
Solution: Each controller has a beforeFilter method which runs when some action is called from controller. Add below lines to your method:
Public function beforeFilter(Event $e) { parent:beforeFilter($e); $this->Auth->allow(‘name of the function here‘); }
Add the name of your functions to which you want to allow access without login. If it is more than one, create an array in that case:
$this->Auth->allow([‘method1 ‘ ,’method2’ ,’method3’);