Closed
Description
Bug report
Describe the bug
userChanges is streamed when we call linkWithCredential on the user, and it works fine on android, but when on chrome it streams data before the link happens, so if you check if the user isAnonymous on a listener you will see it will still be anonymous
Steps to reproduce
- Initialize firebase as you would
- Listen to the userChanges stream
FirebaseAuth.instance.userChanges().listen((event) { print("User updated: ${event}"); });
- SignIn anonymously
auth.FirebaseAuth.instance.signInAnonymously();
- Link the anonymous account
auth.FirebaseAuth.instance.currentUser!.linkWithCredential(EmailAuthProvider.credential(email: "[email protected]", password: "dasdsadsa",),);
- Now build for android and see it working as expected
- Then build for chrome and see that after linking the account you will receive an update on the stream but the account they give you on the stream will still not be linked
Expected behavior
For the stream be updated after the user get linked not before
Sample project
Providing a minimal example project which demonstrates the bug in isolation from your main App greatly enhances the chance of a timely fix.
Please link to the public repository URL.
Additional context
Add any other context about the problem here.
Flutter doctor
Run flutter doctor
and paste the output below:
Click To Expand
PASTE OUTPUT INSIDE HERE
Flutter dependencies
Run flutter pub deps -- --style=compact
and paste the output below:
Click To Expand
PASTE OUTPUT INSIDE HERE