I'm having some auth loop problems and pretty sure it is boost module related. I've tried having boost not cache js but it didn't help. If anyone is running boost with fb connect, please share your settings.
I'm having some auth loop problems and pretty sure it is boost module related. I've tried having boost not cache js but it didn't help. If anyone is running boost with fb connect, please share your settings.
Comments
Comment #1
nardberjean commentedIt does not work for me but I do not know if it is related to boost.
Comment #2
mikeytown2 commentedDoes it run hook_user on login?
Comment #3
adub commentedI'm groping in the dark but as far as I can see hook_user is called on logout and view. Don't know if Dave Cohen can shed any more light. I've switched off boost and fb module seems to be playing nicely now so it looks like there is currently an incompatibility here.
Comment #4
Dave Cohen commentedI've never used boost.
But with caching, you want to treat connected users as if they were logged into drupal. If a user is connected, there will be a handful of cookies all starting with your app's APIKEY. For example if your apikey is 1234, and the cookie 1234_session_key is found, you should not serve a cached page to that user.
If you do, the page will always seem to come from a not-connected user. But the javascript that executes on the page will determine the user is connected, and attempt to refresh the page. That's why the infinite loop.
In fb_settings.inc, the code disabled Drupal's cache. But it can't disable a cache that sits in front of drupal.
Comment #5
nardberjean commentedBoost do not cache POST request, and once a post request set a cookies, that cookie prevents boost from caching, if I understand well. So regular and openid login probably use post request.
Comment #6
Dave Cohen commentedRight but facebook connect uses javascript completely independent of the original page request.
Comment #7
mikeytown2 commentedMind posting the code and how it gets triggered in JS?
Comment #8
Dave Cohen commentedThe code is sitting in modules/fb/fb_settings.inc. It just sets $conf['cache']=0.
This stuff happens in PHP not javascript. If you have a cache set up in front of Drupal, there's nothing my code can do to help. You have to poke a whole in your caching mechanism so that if facebook's cookies are set, the request goes to the server instead of from the cache.
Comment #9
nardberjean commentedWell boost is not an obscure thing rarely used. It may be almost a necessity for numerous web site, eg on shared hosting, where drupal may show very slow and other cache system may not be available or much more difficult to install than boost.
Comment #10
mikeytown2 commentedCan I get a backtrace of how this function gets called?
Edit: Does this function get called when your using boost and this module?
Comment #11
giorgio79 commentedsubs
Comment #12
nirad commentedsubscribing
Comment #13
gausarts commentedHi,
Currently I have my drupal cache set to 5 minutes normal, and the login block is still presented even when the user is already logged in via FB. Weird.
UPDATE: my mistake about the above login block problem, sorry. I followed the handbook too strictly to leave the advanced user settings alone, so I left it alone. It's all there to touch in fact :) But still wonder about the rest of my question:
I'd love a confirmation. Will this fb connect even fail with memcache and authcache, too?
Comment #14
junro commentedsubscribe
Comment #15
Dave Cohen commented@mikeytown2: to see how fb_settings_session_helper is called, see fb_session.inc, which is a replacement for drupal's session.inc. It's called early in drupal's bootstrap. It's main purpose is to change the session id when facebook controls the session.
I agree it would be nice to work with Boost and all other caching mechanisms. The key is that with any caching option which is in front of drupal, it's possible that none of drupal's code will be called. These caches need to be configured to recognize facebook's cookies as well as drupal's. (And note that in DFF 3.x, the cookies have changed to a single cookie, because facebook's new libs do it that way).
If anyone gets Boost configured correctly, please share how you did it.
Comment #16
jghyde commentedI have boost configured with fb module and it seems to be working fine. Boost doesn't cache authenticated users, it appears.
I did not do anything special.
The site is http://www.sanangelolive.com/
and http://apps.facebook.com/sanangelo
Joe
Comment #17
loze commentedI was having this problem with boost and infinite looping.
Make sure you are excluding the path fb* from being cached by boost. (I wasn't)
Delete all the boost cached files in cache/normal/[yoursite]/fb/
and it stopped.
Hope that helps someone.
Comment #18
13rac1 commentedFix is #17. Closing old issue.