Within the Android app I create an anonymous user, and later migrate this user's data to a Google/Facebook auth account when the user decides to sign-in.
This has been working fine until using the FirebaseAuth updateProfile() method, whereafter the user is no longer anonymous when you call the isAnonymous() method.
From the Firebase API docs - https://developers.google.com/android/reference/com/google/firebase/auth/FirebaseUser.html#isAnonymous() :
isAnonymous():
Returns true if the user is anonymous; that is, the user account was created with signInAnonymously() and has not been linked to another account with linkWithCredential(AuthCredential).
FirebaseUser updateProfile() method:
FirebaseAuth.getInstance().currentUser?.updateProfile(
UserProfileChangeRequest.Builder()
.setDisplayName("Anonymous User")
.build())
The above method is called so that later in the app I can check the anonymous user's display name and write it to the database etc.
According to the API docs a user is considered anonymous until such stage that linkWithCredential() is called or the user signs in with an auth provider method, so why does the updateProfile() method make the anonymous user no longer anonymous?