-
Notifications
You must be signed in to change notification settings - Fork 4k
firebase_auth onAuthStateChanged not updated on linkWithCredential #2690
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@TahaTesser I am able to link an anonymous user to a phone provider, but the ..but after some more testing, i think the problem is related to I'll close this for now, but if you have any experience with this scenario, please help. Thank you. |
@TahaTesser Actually it does seem somewhat random, like he mentions in #2434 I removed the use of I don't get a new |
I think this is related to #717 |
Hi @erf |
@TahaTesser that could make quite the complex example Could you tell me if the following:
is supposed to trigger an event in If not, then i guess everything is fine. Except i think this is what should happen. I started using firebase_user_stream which solved my issue. |
I know this repo is not for the firebase JS web sdk, but I have the same issue there. I'm signed in as an anonymous user and upon linking with a credential it does not trigger the onAuthStateChanged. Normally I wouldn't comment on an unrelated repo but I think these issues might be related somehow. .reload() also doesn't do anything for me so that also seems the same. |
Reload doesn't retrigger anything, you should be able to call |
I get that, I was talking about triggering the auth state change. |
I'm having the same problem after linking an anonymous user with an other provider, the onAuthStateChanged is not triggered. I am using a StreamProvider with FirebaseUser, and was expecting it to be triggered so my UI is refreshed accordingly (currently using a Visibility Widget to display extra option with the firebaseUser.isAnonymous property). If this is not working correctly, how are we supposed to rely on that boolean ? |
I believe this is solved in firebase_auth 0.18.0. You can now listen to the |
Describe the bug
I'm linking an Anonymous firebaseUser to a Phone provider using
firebaseUser.linkWithCredential
butonAuthStateChanged
is not triggered, even if i callfirebaseUser.reload()
.To Reproduce
Steps to reproduce the behavior:
linkWithCredential
Expected behavior
I would expect
Firebase.instance.onAuthStateChanged
to be triggered with a new event, especially after callingfirebaseUser.reload
.Additional context
Flutter doctor
Run
flutter doctor
and paste the output below:The text was updated successfully, but these errors were encountered: