I'm using cookies that should be valid for subdomain and therefore set
session.cookie_domain = .mydomain.com
when I call Phalcon\Http\Cookie->delete() the cookies don't get deleted.
$this->cookies->get('MyCookie')->delete();
I've had to result to this php code to have them deleted:
setcookie('MyCookie', null, -1, '/', ini_get('session.cookie_domain'));
I'm using v1.3.1
same to me, best way delete cookie in phalcon ?
Alternative way to delete cookie, just set cookie with negative time. Browsers know what to do. BTW this is what phalcon probably do under.
$this->cookies->set('remember', 'remember me', time() - 86400);
My auth system login/logout was working prior to me setting domain and httponly.
The only way to get the cookie to delete was to set negative expire time.
thanks @j3l3v
Needs fixing
Any update?
@addinm The 1.3.x branch is not longer supported. Could you please try 3.2.x.
Closing in favor of #13052.
Most helpful comment
Alternative way to delete cookie, just set cookie with negative time. Browsers know what to do. BTW this is what phalcon probably do under.