Firebase phone Auth for Android , Can we just verify phone number without creating a user account

You can't verify what the user typed without linking the phone provider to the Firebase user in the process.

But you can unlink the phone from the user account soon after, by calling:

FirebaseAuth.getInstance().getCurrentUser().
        unlink(PhoneAuthProvider.PROVIDER_ID)
        .addOnCompleteListener(this, onCompleteListener);

There are plenty of uses for verifying that the user has access to this phone number, but shouldn't login with it. I really think that Firebase should allow developers to verify first, and use the credential to login after.

Also:

There is a good chance of Google Play Services verifying automatically. When onVerificationCompleted(PhoneAuthCredential) in your PhoneAuthProvider.OnVerificationStateChangedCallbacks is called. This way the user won't need to type the verification code, and the phone won't be linked automatically.


Verifying a phone number automatically creates a Firebase Authentication account for that user. There is no way to prevent creating this account, as it is what Firebase uses to ensure it knows that user next time they start the app.