FlutterFlow / flutterflow-issues

A community issue tracker for FlutterFlow.
130 stars 26 forks source link

Facebook Auth With Firebase #4694

Open jakubmichalski opened 3 weeks ago

jakubmichalski commented 3 weeks ago

Can we access your project?

Current Behavior

I attempt to integrate Facebook login following official instruction. I've already working Apple and Google login.

Reproducible on real devices and simulators (iOS and Android). Reproducible on deployed version (via TestFlight) and local run.

Current behaviour:

  1. User clicks on "Facebook login" button which executes "Log In" action in FlutterFlow with auth provider Facebook.
  2. User provides Facebook credentials clicks continue on popup window.
  3. FlutterFlow shows auth error.

Expected Behavior

At step 3 user to be authenticated in Firebase.

Steps to Reproduce

  1. Create new app in Facebook (it forces API v21)
  2. Enable Facebook login as per official instruction.

Reproducible from Blank

Bug Report Code (Required)

ITFXzfLl7ZdPmNhE+qXyK8dVgjgwFjMMbY0v0u0bFB4YF4zzP7MAYeDeR0NKTPWqdAhiMWGkhmcCpvDIkuDLJew4aA2uUbpT0JVAZzrxWlqhWpfTCJaOQ3BCI8JmI26g3J2vgR0nCLJ1LXdn3U2pNq3qNleeY8aSfxBlZ7vfcPo=

Visual documentation

I have investigated the issue in AndroidStudio and I noticed the Facebook AccessTokenType.limited is being used.

If I add in AndroidManifest.xml <meta-data android:name="com.facebook.sdk.ClientToken" android:value="@string/facebook_client_token" /> and corresponding client-token in strings.xml, then during Facebook authentication AccessTokenType.classic token is being used.

With AccessTokenType.classic user gets authenticated successfully in Firebase and I see user is created with Facebook. Then in the FlutterFlow app, I got authenticated user with Firebase sign-in.

Environment

[!] Flutter (Channel [user-branch], 3.24.2, on macOS 15.0.1 24A348 darwin-arm64, locale pl-PL)
    ! Flutter version 3.24.2 on channel [user-branch] at /Users/jakub/Library/Application Support/io.flutterflow.prod.mac/flutter
      Currently on an unknown channel. Run `flutter channel` to switch to an official channel.
      If that doesn't fix the issue, reinstall Flutter by following instructions at https://flutter.dev/setup.
    ! The flutter binary is not on your path. Consider adding /Users/jakub/Library/Application Support/io.flutterflow.prod.mac/flutter/bin to your path.
    ! The dart binary is not on your path. Consider adding /Users/jakub/Library/Application Support/io.flutterflow.prod.mac/flutter/bin to your path.
    ! Upstream repository unknown source is not a standard remote.
      Set environment variable "FLUTTER_GIT_URL" to unknown source to dismiss this error.
    • Framework revision 4cf269e36d (8 weeks ago), 2024-09-03 14:30:00 -0700
    • Engine revision a6bd3f1de1
    • Dart version 3.5.2
    • DevTools version 2.37.2
    • If those were intentional, you can disregard the above warnings; however it is recommended to use "git" directly to perform update checks and upgrades.

[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    • Android SDK at /Users/jakub/Library/Android/sdk
    • Platform android-34, build-tools 34.0.0
    • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 17.0.11+0-17.0.11b1207.24-11852314)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 15.4)
    • Xcode at /Applications/Xcode_15.4.app/Contents/Developer
    • Build 15F31d
    • CocoaPods version 1.15.2

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

[✓] Android Studio (version 2024.1)
    • 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 17.0.11+0-17.0.11b1207.24-11852314)

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

[✓] Connected device (6 available)
    • sdk gphone64 arm64 (mobile)     • emulator-5554                        • android-arm64  • Android 14 (API 34) (emulator)
    • iPhone (Jakub) (mobile)         • 00008110-000644AC3AE3801E            • ios            • iOS 18.0.1 22A3370
    • iPhone 15 Pro Max (mobile)      • 3EE75AEC-2D79-479B-AA39-DA66DA8CF105 • ios            • com.apple.CoreSimulator.SimRuntime.iOS-17-5 (simulator)
    • macOS (desktop)                 • macos                                • darwin-arm64   • macOS 15.0.1 24A348 darwin-arm64
    • Mac Designed for iPad (desktop) • mac-designed-for-ipad                • darwin         • macOS 15.0.1 24A348 darwin-arm64
    • Chrome (web)                    • chrome                               • web-javascript • Google Chrome 130.0.6723.70

[✓] Network resources
    • All expected network resources are available.

! Doctor found issues in 1 category.

Additional Information

Blocking Facebook login implementation (Google and Apple are working as expected).

Alezanello commented 3 weeks ago

Hello!

Thank you for bringing this to our attention. I’ll double-check the details you mentioned. In the meantime, could you let us know if this issue is still occurring on your end?

Thanks again for your patience!

jakubmichalski commented 3 weeks ago

Hi @Alezanello thank you for checking, I can confirm the problem still occurs. In addition, I was able to check on web (deployed to production, hosted by flutterflow) and the result is nothing happens after press of Facebook button (same code as in case of iOS where I get the Facebook login window). I think the same case was described in #2709. Also I made sure the email from facebook is not associated with any existing firebase account (i.e. I have removed it).

I have also tried to re-create Meta/Facebook App - there is no improvement.

helloheesu commented 2 weeks ago

Hi, I think I'm having similar issue on deployed web app. I commented about my issue on this comment: https://github.com/FlutterFlow/flutterflow-issues/issues/602#issuecomment-2454264654

github-actions[bot] commented 1 week ago

This issue is stale because it has been open for 7 days with no activity. If there are no further updates, a team member will close the issue.

dawn2000000 commented 1 week ago

This issue is stale because it has been open for 7 days with no activity. If there are no further updates, a team member will close the issue.

Has FlutterFlow resolved the issue so that the Flutterflow/Facebook/Firebase integration works yet?

dawn2000000 commented 1 week ago

Hi @Alezanello thank you for checking, I can confirm the problem still occurs. In addition, I was able to check on web (deployed to production, hosted by flutterflow) and the result is nothing happens after press of Facebook button (same code as in case of iOS where I get the Facebook login window). I think the same case was described in #2709. Also I made sure the email from facebook is not associated with any existing firebase account (i.e. I have removed it).

I have also tried to re-create Meta/Facebook App - there is no improvement.

Has Flutterflow or Firebase helped you resolve this yet?

jakubmichalski commented 1 week ago

The issue is still open

kokosmedia commented 1 week ago

I confirm - I have the same error. Pressing the Facebook login button has no response at all. Tested on a physical device using an application added in Google Play (internal tests). The worst thing is that it was working and suddenly it stopped working, and Facebook login is one of the key features of my app. @Alezanello

Alezanello commented 1 week ago

Hello!

I will escalate this issue to the engineering team for a more in-depth review to understand why the behavior has suddenly changed. While I couldn’t replicate it on my end, I see that others are experiencing the same issue, so I'll proceed with forwarding this ticket for further investigation.

kokosmedia commented 1 week ago

@Alezanello When can we expect some update on this?