"For your account security logging into facebook from an embedded browser is disabled" cordova facebook-connect

3.6k views Asked by At

I have been a user of cordova-plugin-facebook4 for years on my hybrid apps and of cordova-plugin-facebook-connect since the facebook4 plugin got deprecated in 2019.

Recently I have been getting reports from users that the Facebook login is failing on multiple apps of mine giving the following error "For your account security logging into Facebook from an embedded browser is disabled, you may be able to continue by updating the app you're logging in from and try again"

ScreenShot

I was able to reproduce this error by uninstalling the Facebook app from the device. and by doing some research I found the following article HERE; Which basically states that Facebook deprecated FB Login authentication on Android embedded browsers beginning of October 5, 2021. I also found this community post HERE stating that it's an ongoing issue that hasn't been fixed yet. The following is a video recording of the login process if you don't have the Facebook app installed on your device VIDEO HERE.

Conclusion; When the Facebook app is installed on a user's device the Facebook SDK triggers and the login flow is completed successfully but when the Facebook app is not installed on the user's device plugin tries to trigger a browser login and you can even see it for a second before Facebook API gives this message you see "for your account security logging into Facebook from an embedded browser is disabled". I even tried to enable Embedded Browser OAuth Login from the Facebook dashboard but that didn't change the behavior at all.

Edit: After couple more hours of investigating turns out this plugin needs androidx to work and during the build, cordova-plugin-facebook4 is installed which uses Facebook android SDK version 5.13 which doesn't support custom tabs .. so after adding the following plugins everything worked just fine.

Please close this.

plugin name="cordova-plugin-androidx"
plugin name="cordova-plugin-androidx-adapter"**

I'm posting this for those who have been facing the same issue on their apps as I didn't see a similar issue here and hoping for a fix or a workaround from the bright minds in here.

Peace.

0

There are 0 answers