1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Fixed Logout gives redirection error

Discussion in 'Resolved Bug Reports' started by Alex Vojacek, Jul 6, 2011.

  1. Alex Vojacek

    Alex Vojacek Member

    Everything was working perfectly up until I updated to xenforo 1.0.3 now as soon as i click on logout (logged with facebook) i have an intermitent redirection error and both chrome and firefox seems to go crazy retrying logout forever, this bug even happens on this xenforo forum so i assume is a 1.0.3 issue.

    Update:
    OK i found the problem. This only happens if you previously logged in with facebook.
    As soon as i click on Logout, xenforo Logs out of FACEBOOK first, then tries to logout from forums and gives a security error and redirect fail.
    Forum still tries to redirect to logout over and over, so, i go to facebook page again, login, and then sudently the xenforo redirection fail stops and i can succesfully logout.
    This is a bug in the logout scheme, forum should logout first THEN logout from facebook.

    Although I really prefer that forum does not logout from facebook, only the forum, that way this problem will be fixed too.

    Anyone else having this problem?
     
  2. Digital Doctor

    Digital Doctor Well-Known Member

    Do you get the Logout Confirmation prompt ?
     

    Attached Files:

  3. Alex Vojacek

    Alex Vojacek Member

    You can try on my forums, do a register by facebook, login and then logout.
    foros.tecnogaming.com
     
  4. Digital Doctor

    Digital Doctor Well-Known Member


    I registered (not Facebook) on your site and had no problems Logging out with Chrome 12.0.742.100
    What browser are you using ?
     
  5. Alex Vojacek

    Alex Vojacek Member

    chrome 12.0.742.112
     
  6. Digital Doctor

    Digital Doctor Well-Known Member

    IE8 - Logged out of your site with no problems.
     
  7. Alex Vojacek

    Alex Vojacek Member

    OK this definetly seems to happen as soon as I use facebook connect, because i tried on another machine and login/logout worked perfectly 9 times in a row, up until i hit the "connect with facebook" and all hell break loose.
     
  8. Alex Vojacek

    Alex Vojacek Member

    OK i found the problem.
    As soon as i click on Logout, xenforo Logs out of FACEBOOK first, then tries to logout from forums and gives a security error and redirect fail.
    Forum still tries to redirect to logout over and over, so, i go to facebook page again, login, and then sudently the xenforo redirection fail stops and i can succesfully logout.
    This is a bug in the logout scheme, forum should logout first THEN logout from facebook. Although I really prefer that forum does not logout from facebook, only the forum, that way this problem will be fixed too.
     
  9. The Forum Heroes

    The Forum Heroes Well-Known Member

    I too have this problem, it only happens though if you are logged in via Facebook though.
     
  10. Alex Vojacek

    Alex Vojacek Member

    Yes, but almost all of my users are logged to facebook and i received complains that forum disconnect them from facebook and in doing so, breaks the logout too.

    This should be fixed.
     
  11. The Forum Heroes

    The Forum Heroes Well-Known Member

    Yes, I just purchased Xenforo today and will be moving from vB, my site is mostly Facebook fan based and using FB login is crucial for me due to that.
     
  12. Kier

    Kier XenForo Developer Staff Member

    It is Facebook policy that logging out of a site using Facebook login should also log you out of Facebook itself. This is not something we have done by choice, we are simply following the rules laid down by Facebook.
     
    CurveGotti likes this.
  13. The Forum Heroes

    The Forum Heroes Well-Known Member

    What can be done to fix this? The bug doesn't exist in 1.0.2
     
  14. Kier

    Kier XenForo Developer Staff Member

    I'm investigating the issue.
     
  15. The Forum Heroes

    The Forum Heroes Well-Known Member

    Thank you Kier
     
  16. Alex Vojacek

    Alex Vojacek Member

    I helped a developer work with facebook plugins and he feels nothing but rage at how facebook policies forces things on them, so believe me when i say i do feel for you. As for the bug, I believe it is due to facebook loging out sooner than forum expects and then forum try to redirect a logout but facebook already logged out, because if redirection fails and i manually go to facebook and login, redirection failure stops.
     
  17. Mike

    Mike XenForo Developer Staff Member

    Looking at the code, that appears to be the case. As a workaround, I believe you can stop the Facebook logout by commenting out/removing this line from js/xenforo/xenforo.js:
    Code:
    FB.logout(XenForo.Facebook.logout);
    That wouldn't be the final fix though.
     
    Brandon Sheley and CurveGotti like this.
  18. Alex Vojacek

    Alex Vojacek Member

    beta-testing my website for so long seem to have pay for me, i just feel it was that problem, i'm glad that you find it so fast, nice!.
    Now for facebook "standards" you should find a way for doing a forum logout and then a facebook logout to avoid redirection failure.
     
  19. Alex Vojacek

    Alex Vojacek Member

    Yep, that fixed it, stopping facebook logout gives no more problems, thank you Mike!
     
  20. Will

    Will Active Member

    Even after removing that line, this error still happens. I don't believe before 1.0.3 it would log me out of Facebook entirely if I logged out of the forum.
     

Share This Page