Closed MenaRaafat closed 2 months ago
@MenaRaafat Thank you for reporting this issue. Can you please provide a minimal but complete reproducible example repo of this issue? Also, could you specify which Facebook library you are using?
@TarekkMA I modified the code example in my main question above. If u need extra info, please inform me.
Concerning the Facebook library, I only followed the instructions on Firebase on how to add Facebook auth: https://firebase.google.com/docs/auth/flutter/federated-auth
I did not specify a Facebook library.
You will need to use a library for Facebook login. For example, in the docs, they use this library: flutter_facebook_auth. You can check this library's documentation for more details on how to use it with firebase.
@TarekkMA But, this is in the section concerning iOS+ & Android. The web section says: "On the web, the Firebase SDK provides support for automatically handling the authentication flow using the Facebook application details provided on the Firebase console."
Oh, thank you for the clarification.
I've replicated the code you have written and I've got the authStateChanges() stream to emit the user change and I didn't encounter any issues. Please check this branch and try to run the example auth app to see if you still have the same issue:
@TarekkMA I solved my problem by deleting the Facebook user from the Firebase auth portal. After that, everything worked fine. I could be mistaken because I do not understand the logic of the solution, but now I have no problems.
Is there an existing issue for this?
Which plugins are affected?
Auth
Which platforms are affected?
Web
Description
I can listen to Google sign in + custom Email & password sign in. But, Facebook doesn't call the
authStateChanges
listenerFirebaseAuth.instance.authStateChanges().listen((User? user)
I can see that the proper User data is returned in the API responses though.Reproducing the issue
Firebase Core version
3.1.1
Firebase Auth version
4.17.7
Flutter Version
3.22.2
Relevant Log Output
No response
Flutter dependencies
Expand
Flutter dependencies
snippet```yaml firebase_auth: ^4.17.7 firebase_core: ^2.26.0 ```
Additional context and comments
No response