Facebook Logoff

edited September 2015 in Social Login
Is there a way to log the user out of Facebook as well as my site?

I ask because the site will be mostly used by multiple people on one computer and would like to log them out of Facebook when logging out of our site.

Best Answer

  • Fred_PinelFred_PinelMember
    Answer ✓
    Hi,
    Close the browser so that Facebook connection cookies are removed (they get added when successfully connected to Facebook). If the user logs into Facebook with Social Login, then any other browser tab will access his/her account.

    The 'set_force_reauthentication' should prompt the user for his credentials when logging in with the Social Login, even if he/her was already connected. This method should be called before rendering the buttons.
    Is this not what you are seeing ? Maybe you can show your URL.

    Regards.

Answers

  • Hi Derek,
    Currently, we do not logout of Facebook when logging the user out of your site.
    The user should close the browser.
    You can use one of our javascript API methods docs.oneall.com/api/javascript/library/methods/#sll_set_force_re_authentication to force the user to enter their Facebook credentials.

    Regards.
  • Thanks.

    Why should the user close the browser?

    Also, "_oneall.push(['social_login', 'set_force_re_authentication', true]);" doesn't seem to force them to enter their Facebook credentials every time. It didn't seem to change anything. Once the user logs into Facebook it just auto logs them in until they logoff on Facebooks site. Was this suppose to prevent the auto login and force them to login each time regardless of if they are logged in on Facebook?
  • Thanks Frederic_Pinel!

    After moving 'set_force_re_authentication' before the other settings it worked.

    Just for reference to others:

    This didn't work -
    var _oneall = _oneall || [];
    _oneall.push(['social_login', 'set_providers', ['facebook', 'google', 'linkedin']]);
    _oneall.push(['social_login', 'set_callback_uri', your_callback_script]);
    _oneall.push(['social_login', 'do_render_ui', 'oa_social_login_container']);
    _oneall.push(['social_login', 'set_force_re_authentication', true]);

    But this did work -
    var _oneall = _oneall || [];
    _oneall.push(['social_login', 'set_force_re_authentication', true]);
    _oneall.push(['social_login', 'set_providers', ['facebook', 'google', 'linkedin']]);
    _oneall.push(['social_login', 'set_callback_uri', your_callback_script]);
    _oneall.push(['social_login', 'do_render_ui', 'oa_social_login_container']);

Welcome!

Please sign in to your OneAll account to ask a new question or to contribute to the discussions.

Please click on the link below to connect to the forum with your OneAll account.