'After reinstalling the app, firebase auth skips login

In my app, I'm using phone auth and we are observing this on Android, after logged in, if I uninstall the app and reinstall it again, it's not asking me to login instead it auto authenticates itself (without phone number or verification code) and logs in to the last logged in user. I did see this question, but nothing useful over there.

  Future<void> verifyPhoneNumber({
    required String phoneNumber,
    required Duration timeOut,
    required PhoneVerificationFailed phoneVerificationFailed,
    required PhoneVerificationCompleted phoneVerificationCompleted,
    required PhoneCodeSent phoneCodeSent,
    required PhoneCodeAutoRetrievalTimeout autoRetrievalTimeout,
  }) async {
    try {
      _firebaseAuth.verifyPhoneNumber(
          phoneNumber: phoneNumber,
          timeout: timeOut,
          verificationCompleted: phoneVerificationCompleted,
          verificationFailed: phoneVerificationFailed,
          codeSent: phoneCodeSent,
          codeAutoRetrievalTimeout: autoRetrievalTimeout);
    } catch (e) {
      throw VerifyPhoneNumberException(e.toString());
    }
  }


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source