flutterfire icon indicating copy to clipboard operation
flutterfire copied to clipboard

[firebase_auth]: Inconsistent uninstall behavior between Android and iOS for anonymous users

Open Doublon opened this issue 1 year ago β€’ 4 comments

Is there an existing issue for this?

  • [x] I have searched the existing issues.

Which plugins are affected?

Auth

Which platforms are affected?

Android, iOS

Description

Hi,

I'm using the firebase_auth library to authenticate anonymously with Firebase using the following code:

However, when I uninstall the application and run this code after reinstalling:

var auth = await FirebaseAuth.instance.signInAnonymously();
_appId = auth.user!.uid;

On Android: I receive a new user ID. On iOS: I receive the previous user ID from the previous installation.

So behavior between Android and iOS isn't consistent.

Reproducing the issue

On Android:

  • Install the app on Android and sign-in anonymously
  • uninstall the app
  • Re-install the app on Android and sign-in anonymously

On iOS:

  • Install the app on Android and sign-in anonymously
  • uninstall the app
  • Re-install the app on Android and sign-in anonymously

Firebase Core version

3.4.0

Flutter Version

3.24.0

Relevant Log Output

No response

Flutter dependencies

Expand Flutter dependencies snippet
firebase_auth: ^5.2.0

Additional context and comments

flutter doctor Doctor summary (to see all details, run flutter doctor -v): [βœ“] Flutter (Channel stable, 3.24.0, on macOS 14.6.1 23G93 darwin-arm64, locale en-US) [βœ“] Android toolchain - develop for Android devices (Android SDK version 35.0.0-rc1) [βœ“] Xcode - develop for iOS and macOS (Xcode 15.4) [βœ“] Android Studio (version 2024.1) [βœ“] IntelliJ IDEA Ultimate Edition (version 2024.2.1) [βœ“] VS Code (version 1.92.2) [βœ“] Connected device (3 available) ! Error: Browsing on the local area network for Harriet’s iPhone. Ensure the device is unlocked and attached with a cable or associated with the same local area network as this Mac. The device must be opted into Developer Mode to connect wirelessly. (code -27) ! Error: Browsing on the local area network for iPhone. Ensure the device is unlocked and attached with a cable or associated with the same local area network as this Mac. The device must be opted into Developer Mode to connect wirelessly. (code -27) [βœ“] Network resources

β€’ No issues found!

Doublon avatar Sep 03 '24 08:09 Doublon