capacitor-community / facebook-login

Facebook Login support
MIT License
103 stars 52 forks source link

Facebook Login changes beginning October 5, 2021 #63

Open eftas-gka opened 3 years ago

eftas-gka commented 3 years ago

Facebook sent the following message on 21.08.2021:

We’ve been monitoring an increase in phishing attempts on Android embedded browsers, also known as WebViews. Because of this, we will no longer support this method of Facebook Login and your users will not be able to log in using Android embedded browsers beginning October 5, 2021. Until then, we will continue to prevent access to Facebook Login on embedded browsers for certain users we deem high-risk in an effort to prevent malicious activity. To avoid a disrupted user experience, please use the following checklist:

  1. Ensure that you have upgraded to version 8.2.0 (or later) of the Facebook SDK for Android. If your app is built to target Android 11 (API level 30) and your users are on Android 11, alternative non-webview login mechanisms provided by the SDK will not work unless you upgrade to or past 8.2.0.
  2. Ensure that you are NOT setting LoginBehavior=WEB_VIEW_ONLY.
  3. Ensure that your app has configured support for Custom Tabs properly. (Not sure what Custom Tabs are? Check here.) To test this, ensure that you have a browser compatible with Custom Tabs (example browsers that support Custom Tabs include Chrome, Samsung Browser, etc). Next, delete the Facebook app from your device if you have it installed. Finally, login from your app. You should see a window open in the external browser rather than in a native WebDialog. If you do not see an external browser launch, follow these instructions: Option 1: Ensure your app is using version 8.2.0 or later of the Facebook SDK for Android. If so, you should not need to make any modifications to your Android manifest. If you have any items referencing “CustomTabMainActivity” or “CustomTabActivity”, remove them. Option 2: Configure your Custom Tabs intent filter exactly following the instructions here. Try Option 1 first and then use Option 2 if Option 1 does not work after testing. There may be cases where we cannot automatically configure your intent filter because of mismatches between the defined ${applicationId} constant and your package name.
  4. If you have already completed steps 1-3 and have released your app to users, users who are on older versions of your application will see an error message when they attempt to login from a webview, prompting them to upgrade to the newest version of your application. If you have mechanisms to force auto-upgrades for existing installations of your application or to prompt your users to upgrade, we encourage you to use them to limit affected users.
  5. If your app is used primarily on devices which are unable to host the login experience in an external browser, we encourage you to integrate Device Login as an alternative login mechanism.

How will this effect capacitor apps? Will it still be possible to provide a login via Facebook?

rdlabo commented 3 years ago

@eftas-gka Did you check SDK version? https://github.com/capacitor-community/facebook-login/blob/master/android/build.gradle#L52

Please use current version, and check 4 . Thanks.

DontGiveAFck commented 2 years ago

@rdlabo Hi! In our project we are still using capacitor v2. Last plugin version for capacitor v.2 is 2.0.0, but that version of plugin has: implementation 'com.facebook.android:facebook-login:8.1.0'

according to email from Facebook SDK version should be at least 8.2.0 to work properly. Are there any ways to fix this coming issue for capacitor v2 plugin?

rdlabo commented 2 years ago

Are there any ways to fix this coming issue for capacitor v2 plugin?

No, we have no plans to continue maintenance of the two versions. Please update to capacitor 3. Thanks.

ciccilleju commented 2 years ago

hello, i'm using capacitor 3, and plugin version 3 and @capacitor-community/facebook-login@3.1.1 suddenly the facebook login stopped working on my samsung s20 with android 11. it still works on my ipad and iphone X

do you have any idea about what happened? thank you!

timeisgolden commented 2 years ago

hello, i'm using capacitor 3, and plugin version 3 and @capacitor-community/facebook-login@3.1.1 suddenly the facebook login stopped working on my samsung s20 with android 11. it still works on my ipad and iphone X

do you have any idea about what happened? thank you!

Hello, ciccilleju, How are you? I have implemented the Facebook login feature, and it's working on the web, android, and iPhone first. the problem is that I am facing the following error in case if I ever have logged in with apple. the error is the follow "code":"auth/account-exists-with-different-credential","message":"An account already exists with the same email address but different sign-in credentials. Sign in using a provider associated with this email address." Do you know How I can solve this issue?

Hansel03 commented 2 years ago

@eftas-gka Did you check SDK version? https://github.com/capacitor-community/facebook-login/blob/master/android/build.gradle#L52

Please use current version, and check 4 . Thanks.

this worked for me, thank you very much