Refreshing or double clicking on a link too quickly causes a CakePHP app using the Auth component to log the user out

StackOverflow https://stackoverflow.com/questions/2219073

Question

I've noticed that when I refresh the page twice in a row or double click on a link, the user is automatically logged out. I'm using cakephp 1.2 and the Auth component. I don't have a lot of experience with CakePHP, any ideas what could cause this?

Was it helpful?

Solution

You probably have Configure::write('Security.level') set to 'high'. In that setting, the Session ID is being regenerated on each request. When you refresh the second time with the same old Cookie that has an old Session ID, it won't be valid anymore.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top