milesj / utility

[Deprecated] A CakePHP plugin for common utility classes.
MIT License
69 stars 24 forks source link

Cookie Mismatch - autologin #2

Closed elogicmedia closed 12 years ago

elogicmedia commented 12 years ago

Hi, I am still having issues with the autologin component, I keep getting cookie mismatch even after setting the cookie to rijndael as previously discussed. My mismatch error email is as follows:

CookieComponent Object
(
[name] => CakeCookie
[time] =>
[path] => /
[domain] =>
[secure] =>
[key] => DYhG93b0qyJffdgsdgdf5454bWwvniR2G0FgaC9mi
[httpOnly] =>
[_values:protected] => Array
    (
        [CakeCookie] => Array
            (
            )

    )

[_type:protected] => rijndael
[_reset:protected] =>
[_expires:protected] => 0
[_response:protected] => CakeResponse Object

etc etc

Any idea what might be going on? One thing to note is the system is using SSL, could this be causing any issues?

Thanks

milesj commented 12 years ago

Out of ideas on this one as well. It looks like the cookie doesn't even exist now.

Have you tried setting secure to true, or messed with the settings in the CookieComponent?

elogicmedia commented 12 years ago

How do I set it to secure? I looked but couldn't see where this was done.

Thanks

Regards,

Adam Symonds

On 16/10/2012, at 4:28 AM, Miles Johnson notifications@github.com wrote:

Out of ideas on this one as well. It looks like the cookie doesn't even exist now.

Have you tried setting secure to true, or messed with the settings in the CookieComponent?

— Reply to this email directly or view it on GitHubhttps://github.com/milesj/cake-utility/issues/2#issuecomment-9455983.

milesj commented 12 years ago

In beforeFilter(): $this->Cookie->secure = true;

This is outside of AutoLogin.

elogicmedia commented 12 years ago

Ahh ok thanks. I was trying to work out how to do it within AutoLogin.

I'll give it a go.

Thanks for your help.

On Tue, Oct 16, 2012 at 6:31 AM, Miles Johnson notifications@github.comwrote:

In beforeFilter(): $this->Cookie->secure = true;

This is outside of AutoLogin.

— Reply to this email directly or view it on GitHubhttps://github.com/milesj/cake-utility/issues/2#issuecomment-9460423.

elogicmedia commented 12 years ago

Thanks for your help. This seemed to be the issue, my cookie has remembered me for 2 days now.