Skip to content
This repository has been archived by the owner on May 28, 2020. It is now read-only.

facebook logout security #12

Open
scvnc opened this issue Jan 15, 2013 · 1 comment
Open

facebook logout security #12

scvnc opened this issue Jan 15, 2013 · 1 comment
Labels
Milestone

Comments

@scvnc
Copy link
Member

scvnc commented Jan 15, 2013

Interesting problem --

case: User logs off of facebook
problem: our app session continues to exist and still displays the previous authenticated user even after another user logs in.

I suppose it will fail/correct once an api call is made.

@phpwerks
Copy link

Added an API call and the issues persists.
Here is what was added

$facebookId = $this->_facebook->getUser();

// From the FaceBook API docs
if (!$facebookId) {
$this->_redirectToLoginUrl();
} else {
// make sure the user is still logged in
try {
$me = $this->_facebook->api('/me');
if ($me) {
//User is logged in
}
} catch (FacebookApiException $e) {
//User is not logged in
$this->_redirectToLoginUrl();
}
}

phpwerks pushed a commit that referenced this issue Feb 18, 2013
Signed-off-by: Peter Brenner <peter@phpwerks.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants