locked
Cookies from WebAuthenticationBroker to use on facebook request dialog RRS feed

  • Question

  • Hi Guys,

    I need a way to keep/fetch the facebook cookies delivered during the authentication process by WebAuthenticationBroker, I don't know what happens with the cookies after the authentication, I need these cookies to use the dialog request from facebook, if I dont have the cookies the following error happens:

    Response Data

    https://www.facebook.com/connect/login_success.html?error_code=110&error_msg=Missing+user+cookie+%28to+validate+session+user%29#_=_

    Thanks

    Rafael

    Thursday, July 19, 2012 1:20 PM

Answers

  • Hi Rafael,

    I think what you're trying to do implement SSO. You can try using PasswordVault class. Once you get the access token use from the first logon – use the password vault API to save the access token.  When you restart the application get the access token from the password vault and use it (no need to logon again)

    -Sagar

    • Marked as answer by Dino He Thursday, July 26, 2012 8:27 AM
    Thursday, July 19, 2012 2:56 PM
    Moderator
  • As you cross posted in another thread you know this is by design already.

    You need to use the long access token from facebook.

    -Jeff


    Jeff Sanders (MSFT)

    Friday, March 29, 2013 11:54 AM
    Moderator

All replies

  • Hi Rafael,

    I think what you're trying to do implement SSO. You can try using PasswordVault class. Once you get the access token use from the first logon – use the password vault API to save the access token.  When you restart the application get the access token from the password vault and use it (no need to logon again)

    -Sagar

    • Marked as answer by Dino He Thursday, July 26, 2012 8:27 AM
    Thursday, July 19, 2012 2:56 PM
    Moderator
  • I have the exact same problem.

    PasswordVault isn't any use here, because the access token expires after 2 hours by default (unless you take the 60-day access token route, but  then you have to expose the app secret in the client).

    In order to get a new access token I need to provide the cookie from the previous login, which WebAuthenticationBroker disposes of unless I do SSO. For SSO, however, I need to provide the user's SID in the redirect URL - which I can't get in Metro style apps. There goes your user experience (down the drain).

    Friday, March 29, 2013 6:48 AM
  • As you cross posted in another thread you know this is by design already.

    You need to use the long access token from facebook.

    -Jeff


    Jeff Sanders (MSFT)

    Friday, March 29, 2013 11:54 AM
    Moderator