User sessions and two CakePHP applications running

2019-05-10 16:29发布

I have 2 CakePHP applications running on the same machine. Both of them need a previous registration to have access to them and the first thing users see is the login form.

I have realized that when I do login in one of them, then, I can access to the other web application without being asked for my credentials to login. (which is not correct)

In my Controllers of both applications I have this to deny access without a previous login.

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

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

But this seems not to work properly when I use the same browser and I do login in one of this applications.

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

Thanks.

1条回答
我想做一个坏孩纸
2楼-- · 2019-05-10 16:36

The cookiename and/or cache prefix should be different for both applications.

You can find those settings in the core.php file

查看更多
登录 后发表回答