CakePHP-Facebook-Plugin icon indicating copy to clipboard operation
CakePHP-Facebook-Plugin copied to clipboard

logging out using logout url does not logout facebook user

Open micopcm408 opened this issue 11 years ago • 2 comments

I am trying to logout directly from url (users/logout). It does logged out after redirect. Then when I refresh the page, it's logged in again. But when logging out using the logout link generated by the helper, it logouts completely with no issue. Is it possible to logout a facebook user using users/logout?

micopcm408 avatar Jul 23 '14 03:07 micopcm408

Helper detects existing facebook session and login you again, what you can do is create logout button like this

echo $this->Facebook->logout(array('label' => 'Logout', 'redirect' => array('controller' => 'users', 'action' => 'logout'))); 

this will logout you from facebook and redirect you to users/logout where you can continue and do like auth->logout()

scrx avatar Aug 07 '14 12:08 scrx

Make sure your users logout method includes: $this->Session->destroy();

NickBusey avatar Oct 15 '14 18:10 NickBusey