Brief background:
Our solution uses firebase anonymous login for "unauthenticated" clients so we can use the created user entities and user uids for RTDB and firestore security rules.
In some cases, clients need to access more "protected" resources and in this case we issue them a custom auth token including some custom claims that they use with signInWithCustomToken().
So clients can be in 1 of two auth "states":
1) anonymous login
2) anonymous login --> custom token login (but keep same uid).
Question 1:
Looking at the Firebase console auth section it seems that:
1) users in state #1 have the string "anonymous" under "identifier" column and an avatar icon for "providers"
2) users in state #2 have null for both identifier and providers.
Does this mean that users that have signed in with the custom token are no longer considered anonymous and won't count towards the anonymous user quota limitation?
Question 2:
Using admin side Firebase.auth().getUser() for both types of users returns the same exact UserRecord - is there a way for us to distinguish between the two? How does the firebase console do this distinction (which it obviously does)? the providerData is an empty array for both cases.