none
MobileServiceClient LoginAsync returns wrong userId RRS feed

  • Question

  • I am using the MobileServiceClient.LoginAsync function to login with a Microsoft- and Facebook account in my Xamarin.Forms app. I came across an issue where the loginAsync returns the wrong userId the second time I login:

    Lets say my facebook userId is: facebook:11111 and my Microsoft userId is: microsoft:22222. If I login with facebook first, the correct userId is returned. If I login with Microsoft after that, the following userId is returned: microsoft:11111 (instead of microsoft:22222). The same happens when I first login with the Microsoft account, the second time I log in with facebook, the facebook userId is facebook:22222 instead of facebook:11111. I use the following code to login:

    var client = new MobileServiceClient(applicationUrl, applicationKey);
    client.LoginAsync(provider);

    I have also tried to logout first before logging in but has no effect. Am I missing something or is this a bug in the MobileServiceClient?

    Monday, November 24, 2014 9:40 PM

All replies

  • Assuming that you are working with the .NET backend, this is a known bug for the server. The fix should be available as part of runtime version 447 when it is available, which should be very soon.


    I'll reply back to this thread once the fix is live.
    Tuesday, November 25, 2014 12:32 AM
    Moderator
  • Thanks for your quick respone Matthew. I am indeed working with the .NET backend. I also see that if I logout, and then log back in again, I don't get the login screen, but I get logged in automatically. Is this also a bug, or by design?

    ps. where do I find the runtime version you are referring to?

    • Edited by ncu Tuesday, November 25, 2014 8:30 AM
    Tuesday, November 25, 2014 8:12 AM