myth-auth
myth-auth copied to clipboard
Deleting a cookie inside Myth Auth Events::on('logout') not working
Hello, Don't know if it's relevant but just in case i post it here. I'm using Event login to set an additional cookie which work perfectly fine, and want to delete it when the Event logout is triggered, but it wasn't working.
I add to change AuthController.php
public function logout()
{
if ($this->auth->check())
{
$this->auth->logout();
}
return redirect()->to(site_url('/'));
}
to
public function logout()
{
if ($this->auth->check())
{
$this->auth->logout();
}
return redirect()->to(site_url('/'))->withCookies();
}
Now it works fine.