devise_facebook_connectable icon indicating copy to clipboard operation
devise_facebook_connectable copied to clipboard

facebook cookie and auto login problems

Open bitzesty opened this issue 14 years ago • 20 comments

Something weird is going on, with fb login. Having removed all my cookies and signed out of both the app and fb, I sometimes get signed in automatically without clicking the fb connect button as a user (and when I try and sign out - I get signed in again as an admin o.0 ).

This occurs across many browsers and different computers (all with cookies cleared) - the only thing that i can think of is it might be an issue with all machines having the same IP address, or a bug with FB connect, or a bug in devise/fb_connectable/facebooker.

I will try upgrading to master and report back

bitzesty avatar Feb 08 '10 01:02 bitzesty

Not a an issue for me, but on the other had I'm only having one user model together with a authorization plugin. Would be possible for me to debug if you cold reproduce it in a dummie app.

grimen avatar Feb 15 '10 05:02 grimen

its a facebooker issue by the looks of it - will make a dummy app, but as well as clear_facebook_session_information I had to do this ::Facebooker::Session.current = nil could it be an issue with Thread.current?

http://github.com/mmangino/facebooker/blob/master/lib/facebooker/session.rb#L93

bitzesty avatar Feb 16 '10 13:02 bitzesty

Solution: we switched to mongrel cluster. passenger and thin still were throwing very weird errors

bitzesty avatar Mar 03 '10 17:03 bitzesty

OK, thanks for the note bitzesty! Did u got a log of those errors?

grimen avatar Mar 03 '10 17:03 grimen

it's hard to log because it looks like there isnt really an error - its just that the fb session is stored in a thread and is leaking to other connections (therefore you can be logged in as a different user, even without logging in). Its a facebooker issue and I have a +1 on replacing that gem with something else.

Just replying as someone messaged me saying they had the same problem.

Matt

bitzesty avatar Mar 03 '10 18:03 bitzesty

OK, open it up again. I need to review this later on. More of a reminder. Sounds like u say: threading issues with Passenger, etc. I only used it with Mongrel and Heroku so far myself.

grimen avatar Mar 03 '10 18:03 grimen

note: I did also see this issue albeit not as frequently with thin (in production)

bitzesty avatar Mar 03 '10 23:03 bitzesty

authlogic_facebook_connect seems to have the same issue http://github.com/kalasjocke/authlogic_facebook_connect/issues#issue/12

nmerouze avatar Mar 04 '10 08:03 nmerouze

Probably same as: http://github.com/grimen/devise_facebook_connectable/issues#issue/18

No solution yet.

grimen avatar Apr 15 '10 02:04 grimen

we're just running in mongrel, not really a fix but it now works

bitzesty avatar Apr 15 '10 12:04 bitzesty

I am seeing this in mongrel also (get automatically logged in). Hope to dive deeper into it to see what the actual problem is.

skwp avatar Apr 20 '10 01:04 skwp

I am using 0.1.9. That's the only version that would actually work. If you take master devise with master devise_facebook_connectable all you get is a lot of fail :) I couldn't get any combination of versions to work until I went to the sample app and went off of that.. (it contains devise 1.0.3 and dfc 0.1.9)

skwp avatar Apr 20 '10 22:04 skwp

devise master is rails 3 only

bitzesty avatar Apr 20 '10 22:04 bitzesty

I think I tried the various branches that were claimed to be compatible with 2.3. But anyway that's not the point of this discussion, don't want to hijack the thread :)

skwp avatar Apr 20 '10 23:04 skwp

@skwp: That's an "old" one =) Get the latest (0.2.1) and let me know how it works... http://rubygems.org/gems/devise_facebook_connectable

grimen avatar Apr 20 '10 23:04 grimen

@grimen ok I'll try to do this tonight and get back to you

skwp avatar Apr 20 '10 23:04 skwp

I just ran into this with facebooker 1.0.55 and devise_facebook_connectable 0.2.1 - Apache/Passenger/Rails 2.3.5 Will try facebooker 1.0.69 and see if it helps.

mattvanhorn avatar Jun 09 '10 20:06 mattvanhorn

just use the new oauth2 api - facebookr is really unstable

bitzesty avatar Jun 09 '10 21:06 bitzesty

I just got this problem again with the latest versions of everything. Someone made a purchase which got assigned to a different user account. There is definitely a thread-safety issue here somewhere. Going to take the above advice and switch to oauth2.

mattvanhorn avatar Jun 15 '10 15:06 mattvanhorn

Yep, Facebooker has some funky bugs (especially with passenger I noticed). Right now I only use this gem for hobby-sites. :) I need to use it soon though, so new Facebook API might be interesting to implement soon.

grimen avatar Jun 15 '10 15:06 grimen