You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[firebase_auth] linking credential to anonymous user #2344
Hey @adworzynski no biggie but in future please try to add log outputs in code blocks, github assumes anything with #number is an issue and links this issue with many others which can make it difficult to triage. I've updated your comment above.
Are you still having problems with your original issue? - thanks!
OK, that is strange. I've created automated test that first create anonymous account and after some time tries to link it with creadentials and it sometimes work and sometimes throw error mentioned earlier.
But even when it works, it looks like authentication status change is not published to FirebaseAuthPlatform.instance.onAuthStateChanged.
Our rework of the Auth, Core & Firestore plugins as part of the FlutterFire roadmap was published over a week ago with a ton of fixes and new features.
As part of this we introduced a new documentation site which should has a lot of new documentation that should cover this issue & others in general. If you spot any issues on the documentation or anything missing then please raise a new GitHub issue, or better yet suggest a change via a Pull Request (there's a 'Edit this page' button at the bottom of every page on the docs).
Activity
TahaTesser commentedon Apr 14, 2020
Hi @adworzynski
can you please provide your
flutter doctor -vandflutter run --verbose?Thank you
adworzynski commentedon Apr 15, 2020
[√] Flutter (Channel stable, v1.12.13+hotfix.9, on Microsoft Windows [Version 10.0.18363.720], locale pl-PL)
• Flutter version 1.12.13+hotfix.9 at C:\Users\Adam\AppData\Local\flutter\flutter
• Framework revision f139b11009 (2 weeks ago), 2020-03-30 13:57:30 -0700
• Engine revision af51afceb8
• Dart version 2.7.2
[!] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
• Android SDK at C:\Users\Adam\AppData\Local\Android\sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-29, build-tools 29.0.3
• Java binary at: C:\Users\Adam\AppData\Local\Java\java\bin\java
• Java version OpenJDK Runtime Environment (AdoptOpenJDK)(build 1.8.0_242-b08)
! Some Android licenses not accepted. To resolve this, run: flutter doctor --android-licenses
[!] Android Studio (not installed)
• Android Studio not found; download from https://developer.android.com/studio/index.html
(or visit https://flutter.dev/setup/#android-setup for detailed instructions).
[√] IntelliJ IDEA Ultimate Edition (version 2019.3)
• IntelliJ at C:\Users\Adam\AppData\Local\JetBrains\Toolbox\apps\IDEA-U\ch-0\193.6911.18
• Flutter plugin version 44.0.3
• Dart plugin version 193.6494.35
[√] Connected device (1 available)
• Android SDK built for x86 • emulator-5554 • android-x86 • Android 10 (API 29) (emulator)
! Doctor found issues in 2 categories.
adworzynski commentedon Apr 15, 2020
kirstywilliams commentedon Apr 21, 2020
Hey @adworzynski no biggie but in future please try to add log outputs in
code blocks, github assumes anything with#numberis an issue and links this issue with many others which can make it difficult to triage. I've updated your comment above.Are you still having problems with your original issue? - thanks!
adworzynski commentedon Apr 23, 2020
Yes, I've upgraded to firebase_auth: 0.16.0, but still the same issue appears.
adworzynski commentedon Apr 23, 2020
OK, that is strange. I've created automated test that first create anonymous account and after some time tries to link it with creadentials and it sometimes work and sometimes throw error mentioned earlier.
But even when it works, it looks like authentication status change is not published to FirebaseAuthPlatform.instance.onAuthStateChanged.
TahaTesser commentedon Apr 23, 2020
Hi @adworzynski
Tto better address the issue, would be helpful
if you could post a minimal code sample to reproduce the problem
Thank you
adworzynski commentedon Apr 23, 2020
I'm just calling:
FirebaseAuth.instance.signInAnonymously();And after that (after filling enrollment form, up to 20 seconds later)
At the top of my application I have StreamBuilder with stream:
FirebaseAuth.instance.onAuthStateChanged.map(_toUser)Salakar commentedon Aug 25, 2020
Hey 👋
Our rework of the Auth, Core & Firestore plugins as part of the FlutterFire roadmap was published over a week ago with a ton of fixes and new features.
As part of this we introduced a new documentation site which should has a lot of new documentation that should cover this issue & others in general. If you spot any issues on the documentation or anything missing then please raise a new GitHub issue, or better yet suggest a change via a Pull Request (there's a 'Edit this page' button at the bottom of every page on the docs).
See: https://firebase.flutter.dev/docs/auth/usage#linking-user-accounts
Additionally, for help migrating to these new plugins I'd recommend checking out the migration guide: https://firebase.flutter.dev/docs/migration