locked
Facebook Logout Issues

    Question

  • I have coded a Windows store app that authenticates via Facebook login, the issue I am facing is that whenever I click on the sign out button, I am not signed out completely.

    function

    fbLogout() {

        client.logout();

        sessionStorage.clear();

        Windows.Storage.ApplicationData.current.localSettings.values[

    "User Name"] = null;

        Windows.Storage.ApplicationData.current.localSettings.values[

    "User Picture"] = null;

        Windows.UI.Popups.MessageDialog(

    "You have been Successfully Logged Out.").showAsync();

        WinJS.Navigation.navigate(

    "/pages/login/login.html");

    }

    everything described in the above function happens but when I reopen the app, it automatically logs me in instead of asking for my credentials.

    P.S.: I had checked the keep me logged in button during login, but I don't think that should create an issue after I log out

    Sunday, April 27, 2014 8:42 AM

All replies

  • Hi Himanshu,

    Seems still have HTML cache exist. Maybe session, maybe cookie, maybe something else.

    I think it should be possible to set a breakpoint when login to Facebook by checking "keep me login" button, you would be able to know where the data goes. Or try to find the documentation on Fackbook for how they manage the user account storage in WinJS.

    Probably clean the sessionState object ?

    --James


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    Monday, April 28, 2014 5:42 AM
    Moderator
  • how do I clean the session state object? there are no methods defined for it.
    Wednesday, April 30, 2014 2:29 PM