darwin-morocho / flutter-facebook-auth

A flutter plugin to add login with facebook in your flutter app
193 stars 127 forks source link

Too many login attemps error only on iOS with basic configuration. #106

Closed minimo-io closed 2 years ago

minimo-io commented 2 years ago

Describe the bug After following the Android & iOS installation instructions, Android login works just fine, iOS return Too many login attemps error. This happens only on iOS with basic configuration. Any idea? Thanks in advance!

Environment Podfile has the following line correctly uncommented: platform :ios, '9.0'

Add your flutter doctor -v doctor.txt

Add your pubspec.yaml flutter_facebook_auth: ^3.3.3-no-nullsafety

Add your Info.plist I converted to txt only for this purpose, it is in .plist Info.txt

Add your AndroidManifest.xml Android works just fine.

To Reproduce ` Future<Map<String, dynamic>> login() async{ /* final AccessToken accessToken = await FacebookAuth.instance.accessToken; if (accessToken != null) { // user is logged for Facebook, so create the shared service // and proceed with login

}
*/
await FacebookAuth.instance.logOut();
final LoginResult result = await FacebookAuth.instance.login(
  permissions: ['public_profile', 'email'],

);

// by default we request the email and the public profile
if (result.status == LoginStatus.success) {
  // you are logged
  //final AccessToken accessToken = result.accessToken;
  var resultJson = await FacebookAuth.instance.getUserData();
  return resultJson;
}{
  return null;
}

}`

Expected behavior Return a correct result.status == LoginStatus.success as in Android.

Screenshots error

darwin-morocho commented 2 years ago

Why you are loggin out to the user before login?.

Also I think that the error message is not a issue of this plugin. Please clone the example project replace with your credentials and let me know if the issue persists

minimo-io commented 2 years ago

Why you are loggin out to the user before login?.

Also I think that the error message is not a issue of this plugin. Please clone the example project replace with your credentials and let me know if the issue persists

Logout its just a test attemp to avoid the too many logins error, but it makes no difference, and is not really causing the error, can remove and its the same. Will clone the project, give it a try and paste the results. Thanks.

minimo-io commented 2 years ago

Unfortunately the issue persists with this example project (the one that matches my dart & flutter versions): https://github.com/darwin-morocho/flutter-facebook-auth/releases/tag/v2.0.1

Issue being on iOS i always get "too many login attemps" error.

darwin-morocho commented 2 years ago

https://github.com/darwin-morocho/flutter-facebook-auth/releases/tag/v2.0.1

too many login attemps

Sorry but I can't help you because this is not an issue of this plugin. I recommend use another device to test or a real device.

Maybe you can find a solution in the official repo https://github.com/facebook/facebook-ios-sdk

minimo-io commented 2 years ago

Unfortunately, it does seem to be issue of this plugin. If you try with your own test app id (the v2.0.1) you will verify that the plugin version returns that error no matter what. Since I only changed the app id of this plugin example.

Maybe you mean that as it is an older version you won't fix it, which is undestandable.

darwin-morocho commented 2 years ago

Unfortunately, it does seem to be issue of this plugin. If you try with your own test app id (the v2.0.1) you will verify that the plugin version returns that error no matter what. Since I only changed the app id of this plugin example.

Maybe you mean that as it is an older version you won't fix it, which is undestandable.

This is not an issue of this plugin because this plugin only connect with the official facebook SDK on iOS any bad configuration or problems with the developer account I cannot fix because is not a issue that I can fixed with code. I've used this plugins since v1.0.0 on iOS without problem

minimo-io commented 2 years ago

Please read my message above, i am using the code (your code) provided with that version of the plugin (v2.0.1) only changing the app id, and it does return the error described. Anyway thanks for your help.

darwin-morocho commented 2 years ago

Please read my message above, i am using the code (your code) provided with that version of the plugin (v2.0.1) only changing the app id, and it does return the error described. Anyway thanks for your help.

Here you have a video using the example 3.3.3-no-nullsafety without any problem

https://drive.google.com/file/d/1W05w1U-aH401tuNxo1h9vX2KyOZc8NIV/view?usp=sharing

minimo-io commented 2 years ago

Please read my message above, i am using the code (your code) provided with that version of the plugin (v2.0.1) only changing the app id, and it does return the error described. Anyway thanks for your help.

Here you have a video using the example 3.3.3-no-nullsafety without any problem

https://drive.google.com/file/d/1W05w1U-aH401tuNxo1h9vX2KyOZc8NIV/view?usp=sharing

I see. First, thanks for taking the time to send that. I guess the problem then it might be that I was using a beta flutter version (specifically 1.24.0-10.2.pre). I am migrating to 2.2.1 now. Hopefully it will solve the issue.

Gracias nuevamente :+1: