none
How to login as different user RRS feed

  • Question

  • I have a WP8 app that uses Azure Mobile service SDK. It accepts Facebook, Twitter, Microsoft Live, and Google. Here is the problem. Say I login using Facebook account. Now I want to log out and login as a different facebook user. Calling MobileServiceClient's Logout() method and then calling LoginAsync() method passing MobileServiceAuthenticationprovider.Facebook as the parameter did not work. It kept defaulting to the first successful login and won't take me to the login page. Same thing happened to Twitter and Google. So my question is how do can I clear the stored login information and start fresh, so to speak?
    Friday, January 31, 2014 5:52 AM

Answers

  • Mark,

    We are aware of this issue and are tracking a bug for the Logout() method. Poking around online, you might find some suggestions to create a new WebBrowser and call ClearCookiesAsync(). The justification is that the cookie state for your application should be shared across WebBrowser instantiations. However, I advise against this approach, as it does not seem to behave consistently across all versions of WP8 (in particular, not in the emulator, and while it works on my phone, it fails on a colleague's). Also, you lose any cookies that you actually wanted to save.

    Restarting the app will work, but of course this is not a desirable user experience. We are working on it, and I hope to have some good news for you soon.

    Matthew

    Friday, January 31, 2014 7:25 PM
    Moderator

All replies

  • Mark,

    We are aware of this issue and are tracking a bug for the Logout() method. Poking around online, you might find some suggestions to create a new WebBrowser and call ClearCookiesAsync(). The justification is that the cookie state for your application should be shared across WebBrowser instantiations. However, I advise against this approach, as it does not seem to behave consistently across all versions of WP8 (in particular, not in the emulator, and while it works on my phone, it fails on a colleague's). Also, you lose any cookies that you actually wanted to save.

    Restarting the app will work, but of course this is not a desirable user experience. We are working on it, and I hope to have some good news for you soon.

    Matthew

    Friday, January 31, 2014 7:25 PM
    Moderator
  • Thank you for the reply. I have marked your comment as an answer because I do want to hear from you on this page when the problem is fixed. Please do no forget about the lowly developer like me that does not have much to depend on other than what your company has to offer. Thank you.
    Friday, January 31, 2014 7:34 PM