Hi,
I got interested in poking around in AuthComponent since I found some
odd redirecting when sessions expire. Have I managed to cause this
somehow or is this a problem known to you all? I have read a lot about
strange redirections but my problem has been boiled down to a very
specific behavior.

When I login I get redirected to the wrong page.
If I am on a page, let the session expire, and then click a link: I
expect to be redirected to the page I clicked for after login. What
happens is that I am redirected to the page I was on when I clicked.

If I type an url or refresh (no referer) a page that has expired: I am
redirected to the default page set in Auth.

What happens is that Auth writes the current url to the session (as
Auth.redirect) before redirecting to the login action. This session is
then "renewed". At least I guess so since the session data is empty
when the login action checks for the value. The session-data is then
written again using the "wrong" referer.

I have checked all this by logging each time Auth referes to
'Auth.redirect'. Auth does not actively kill the session so it is hard
to decide if Auth or the Session-class is to blame.

I haven't found out exactly where the session-data is being deleted.
SessionComponent calls destroy before the first Session-write in Auth
but not between the first write and the login-action. I thouht you
could kill a session and start a new one in mid-request so to speak?

It is getting late in my part of the world now. I'll add to this
thread if/when I find anything else related to this.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to