User sessions and two CakePHP applications running on the same machine

I have 2 CakePHP applications running on the same computer. Both of them need previous registration in order to be able to access them and the first thing users see is the login form.

I realized that when I log into one of them, I can access the other web application without prompting me for login credentials. (which is wrong)

In my controllers of both apps, I have this to deny access without previous login.

public function beforeFilter(){
    parent::beforeFilter();

    $this->Auth->deny();
}

      

But it doesn't work as expected when I use the same browser and I log in to one of these applications.

Why is this happening? Is there a way to solve this?

Thank.

+3


source to share


1 answer


The cookieame and / or cache prefix must be different for both applications.



These parameters can be found in the file core.php

+4


source







All Articles