If facebook user has authorized app, and account map exists, login as the local user.

fb_user.module has a cool function that detects the FB user and logs that person in automatically. Very nice. But when I logout the darn thing logs me back in again!

From server logs:

Jul 14 00:43:59 Session closed for admin.
Jul 14 00:44:00 Session opened for admin. 

Pretty funny actually.

Comments

dqd’s picture

same here

Dave Cohen’s picture

fb_connect.js has code that attempts to log user out of facebook and Drupal at the same time. Is that code being executed? Any javascript errors in your console?

dqd’s picture

Dave, where else than firebug console can I proof if that code of fb_connect.js is executed? No error messages found here @ FF 5.0, Drupal 7.4 with latest fb-7.x-dev shot

dqd’s picture

ok, to help with more information, here the scenario: landing on the frontpage with being completely logged out from Drupal and Facebook and pressing the "login with facebook" button (set up as block), logs me in @ Drupal page with the latest facebook account I have used (visible in the block with name and profile pic). Even if I am not logged in @ Facebook no more. I've tested if it logs me back in to facebook too in another tab. But no. At Facebook I am still logged out. Then, trying to logout from Drupal page failes. Everytime I press logout in the user menu, the page reloads and shows me still logged in with latest Facebook account.

I think, fb takes the last facebook cookie to reproduce an ID. Not sure, but his could be a hint for that facebook is making wierd things with cookies after logout. It looks like that the cookie is still kind of active. At least fb module thinks that ...

Dave Cohen’s picture

When you login via the facebook connect button, you should be logged into both facebook.com and your drupal site. When you log out of either, you should be logged out of both (after you refresh or follow a link).

modules/fb does very little thinking about whether or not you are logged into facebook. It asks facebook's php sdk and believes whatever answer it gets. Facebook's php sdk does use cookies.

Disable drupal's caching. Disable login toboggan or any module like that, if you have it enabled. Enable fb_devel.module. Look in drupal logs for anything suspicious. Look in firebug or chrome console for anything suspicious. And see if you can reproduce on www.drupalforfacebook.org (which uses 6.x).

dqd’s picture

ok, thank you, Dave. I do like you sad and come back to report ...

zhangyb’s picture

Confirm that I have the same issue in #4. Situation is as described in the post.

giorgio79’s picture

+1 as #4
I also cannot logout from the facebook app as it takes me to http://www.facebook.com/4oh4.php

After deleting Chrome cookies and reloading the apps facebook page I got this:

Notice: Undefined offset: 1 in fb_settings_get_facebook_cookie() (line 149 of .../sites/all/modules/fb/fb_settings.inc).

redowie’s picture

I get similar error. I get "fb.logout called before calling fb.init" in firebug console. Occassionally I get it fb.logout being called without an access token.