darwin-morocho / flutter-facebook-auth

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

The supplied auth credential is malformed or has expired #312

Closed AndreDrummer closed 1 year ago

AndreDrummer commented 1 year ago

What version are you using?

flutter_facebook_auth: ^5.0.6

What OS and version are you using to local deploy your application?

macOS Monterey v12.6.1

What platforms are you seeing the problem on?

Android, iOS

pubspec.yaml

name: tiutiu
description: A new Flutter project.

# The following line prevents the package from being accidentally published to
# pub.dev using `pub publish`. This is preferred for private packages.
publish_to: 'none' # Remove this line if you wish to publish to pub.dev

# The following defines the version and build number for your application.
# A version number is three numbers separated by dots, like 1.2.43
# followed by an optional build number separated by a +.
# Both the version and the builder number may be overridden in flutter
# build by specifying --build-name and --build-number, respectively.
# In Android, build-name is used as versionName while build-number used as versionCode.
# Read more about Android versioning at https://developer.android.com/studio/publish/versioning
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
# Read more about iOS versioning at
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
version: 1.0.6

environment:
  sdk: ">=2.17.0 <3.0.0"

dependencies:
  flutter:
    sdk: flutter  
  mask_text_input_formatter: ^2.3.0
  flutter_facebook_auth: ^5.0.6
  font_awesome_flutter: ^10.2.1
  flutter_screenutil: ^5.5.3+2
  cached_network_image: ^3.2.1    
  flutter_chat_bubble: ^2.0.0
  shared_preferences: ^2.0.15
  permission_handler: ^10.0.0
  sign_in_with_apple: ^4.1.0
  loading_animations: ^2.2.0  
  flutter_speed_dial: ^6.0.0  
  connectivity_plus: ^2.3.7    
  pin_code_fields: ^7.4.0
  carousel_slider: ^4.0.0  
  cupertino_icons: ^1.0.5
  auto_size_text: ^3.0.0
  google_sign_in: ^5.4.0
  image_picker: ^0.8.5+3      
  maps_launcher: ^2.0.1  
  brasil_fields: ^1.6.0
  flutter_html: ^2.2.1
  google_fonts: ^3.0.1
  url_launcher: ^6.1.5
  share_plus: ^4.0.10
  geolocator: ^9.0.1
  geocoding: ^2.0.5  
  provider: ^6.0.3
  sqflite: ^2.0.3
  intl: ^0.17.0  
  uuid: ^3.0.6
  video_player:
  dio: ^4.0.6
  get: ^4.6.5
  chewie:

  firebase_core_platform_interface: 4.5.1
  firebase_dynamic_links: ^4.3.8  
  firebase_messaging: ^12.0.1
  firebase_analytics: ^9.3.0
  firebase_database: ^9.1.0
  firebase_storage: ^10.3.4
  cloud_firestore: ^3.4.3
  firebase_core: ^1.23.0
  firebase_auth: ^3.10.0  

flutter_icons:
  android: "launcher_icon"
  ios: true
  image_path: "assets/icon.png"

dev_dependencies:
  flutter_test:
    sdk: flutter
  flutter_launcher_icons: ^0.9.3
  pedantic: any

flutter:

  uses-material-design: true  
  assets:    
    - assets/startscreen/
    - assets/images/
    - assets/json/

  # An image asset can refer to one or more resolution-specific "variants", see
  # https://flutter.dev/assets-and-images/#resolution-aware.

Describe the Bug

Every time I've tried to signin with Facebook using an account that there is no the Facebook app owner, I got this error:

[firebase_auth/invalid-credential] The supplied auth credential is malformed or has expired. [ Unable to retrieve user's identity from facebook.com response, JSON response does not contain id: {"picture":{"data":{"is_silhouette":false,"width":100,"url":"https://platform-lookaside.fbsbx.com/platform/profilepic/?asid=1258444881620436&height=100&width=100&ext=1672536471&hash=AeRWYnYYss8IQpBSnoY","height":100}}} ]

I have searched a lot during the last month and finally, I decided to open this issue. It has been very stressful and energy-draining and I'm in the closing days to launch the app. That is the only feature remaining.

Expected Behavior

I expected to have a fluid login process.

To Reproduce

It is simple to reproduce. You need just to try login or create an account on Firebase utilizing the plugin documentation references.

Relevant log output

No response

flutter doctor -v

[✓] Flutter (Channel unknown, 3.0.2, on macOS 12.6.1 21G217 darwin-arm (Rosetta), locale en-BR)
    • Flutter version 3.0.2 at /Users/andre.silva/sdk-flutter
    • Upstream repository unknown
    • Framework revision cd41fdd495 (6 months ago), 2022-06-08 09:52:13 -0700
    • Engine revision f15f824b57
    • Dart version 2.17.3
    • DevTools version 2.12.2

[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.1)
    • Android SDK at /Users/andre.silva/Library/Android/sdk
    • Platform android-33, build-tools 33.0.1
    • ANDROID_HOME = /Users/andre.silva/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.13+0-b1751.21-8125866)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 13.2.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • CocoaPods version 1.11.3

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2021.3)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.13+0-b1751.21-8125866)

[✓] IntelliJ IDEA Ultimate Edition (version 2022.2.3)
    • IntelliJ at /Applications/IntelliJ IDEA.app
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart

[✓] IntelliJ IDEA Community Edition (version 2022.2.3)
    • IntelliJ at /Applications/IntelliJ IDEA CE.app
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart

[✓] VS Code (version 1.73.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.54.0

Scanning for devices is taking a long time...[✓] Connected device (3 available)
    • Redmi Note 8 Pro (mobile) • v88pbe9dqwcyzh5x • android-arm64  • Android 10 (API 29)
    • macOS (desktop)           • macos            • darwin-arm64   • macOS 12.6.1 21G217 darwin-arm (Rosetta)
    • Chrome (web)              • chrome           • web-javascript • Google Chrome 107.0.5304.121

[✓] HTTP Host Availability
    • All required HTTP hosts are available

• No issues found!

Info.plist (iOS)

No response

Podfile (iOS)

No response

AndroidManifest.xml

No response

MainActivity.java

No response

MainActivity.kt

No response

index.html

No response

Info.plist (macOS)

No response

darwin-morocho commented 1 year ago

Hi @AndreDrummer I think this is not an issue of this plugin.

Have you checked this https://stackoverflow.com/questions/67072583/flutter-facebook-auth-the-supplied-auth-credential-is-malformed-or-has-expired?

AndreDrummer commented 1 year ago

Hi @darwin-morocho , yes I have seen it before opening the issue. In my app, I also need to use WhatsApp products among with Facebook Login. For that, I needed to set up my Facebook app as an Enterprise one. There is nothing I can do to get rid of this error situation?

darwin-morocho commented 1 year ago

Hi @darwin-morocho , yes I have seen it before opening the issue. In my app, I also need to use WhatsApp products among with Facebook Login. For that, I needed to set up my Facebook app as an Enterprise one. There is nothing I can do to get rid of this error situation?

Sorry. This plugin allows you sign in with Facebook but any additional configuration to use with third providers is your responsability