none
can't login with facebook provider from 8.1 Store App. RRS feed

  • Question

  • Logging in with facebook provider from 8.1 Store App failed.

    My facebook account requires two factor authentication. When trying to log in,I entered name and password ,then the page which requires generated code for two factor authentication appeared. But soon page showed error something like "can't connect to service."

    I did setting to authenticate for Facebook and Google on Mobile App back end. I can log in from Xamarin.Forms android app with facebook provider.

    Is there bug in Mobile Client Lib on Store App? Or I did something wrong?

    Here is repro projects. TestMobAppCli_copy is Xamarin.Forms app. It works well. TestMobCli_Auth is Store App. It has some problem.

    I keep my mobile app back end working for several time. So repro projects will work by just pressing F5.

    repro.zip


    cyclops

    Thursday, July 21, 2016 3:47 PM

All replies

  • Hello,

    Thank you for posting here!

     As you are getting this error "can't connect to service.", this might be the cause of time out issue.

    Have you specified any session time for your login authentication?

    Facebook sessions get invalidated all the time. The Facebook SDK can provide your app with an invalid session token due to cached data at the SDK or system level; auth tokens expire due to user behavior like resetting passwords or manually invalidating apps under the user’s settings.

    So, after signup, your app should not assume you can ever get another valid token from the Facebook SDK. In some cases, if you want to keep the session alive, you might have to prompt the user to authenticate with Facebook again.

    Please try this, if it doesn’t help, let us know, we are happy to assist you more.

    Regards,

    Swikruti

    If a post answers your question, please click Mark as Answer on that post and Vote as Helpful.

    Friday, July 22, 2016 1:31 PM
  • Hi,

    Thank you for your reply.

    I know authentication token may be invalidated by some reason,but in this case I can't even log in.

    I tried to expire auth token by removing app under facebook's user's settings,but result is same.



    I can log in properly with another account which doesn't require two factor auth.

    Anyway it seems like some problem related to two factor auth and windows store app,doesn't it?

    I attached gif file which recorded failed login sequence.

    error.gif


    cyclops

    Saturday, July 23, 2016 11:12 AM
  • Hello,

    Thank you for getting back to us.

    I would suggest you to check this article, which has described about two factor authentication with Facebook. Please check, if you have done all the steps. May be something has missed, which might be the cause of the error.

    Else let us back, we will assist you more.

    Regards,

    Swikruti

    If a post answers your question, please click Mark as Answer on that post and Vote as Helpful.

    Monday, July 25, 2016 1:04 PM
  • The link you suggest explains 2FA, but I can log in from Xamarin.Forms app with 2FA and always I use 2FA for Facebook from browser or Facebook app.

    Those means my setting of 2FA for Facebook is right and problem will be somewhere else. No?

    Making points clear,

    1.I always use 2FA for Facebook from browser and Facebook App.

    2.I can log in to Facebook with 2FA from Xamarin.Forms App. 

    3.When I log in from Windows Store App, log in sequence shows strange behavior like animate.gif that I uploaded.


    cyclops

    Wednesday, July 27, 2016 4:54 PM
  • You probably need to use client-directed login for Facebook. Add the Facebook client SDK to your UWP app and pass the token to the LoginAsync call. To learn more, see https://azure.microsoft.com/en-us/documentation/articles/app-service-authentication-overview/
    • Proposed as answer by Swikruti Bose Saturday, July 30, 2016 7:08 AM
    Friday, July 29, 2016 9:42 PM
    Moderator
  • Do you mean Server Flow doesn't support Facebook's 2FA?
    Saturday, July 30, 2016 1:24 AM
  • I changed my profile name from cyclops2 to omanuke.

    Now my questions are ...

    1.App service server flow does support 2FA of Facebook or not.

    2.2FA of Facebook works on Mobile Client SDK for Xamarin.Forms , but not for 8.1StoreApp. Why there are such difference.

    Saturday, July 30, 2016 7:16 AM