2

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());
    }
  }
imgkl
  • 1,013
  • 1
  • 7
  • 24

0 Answers0