I am new to Firebase and i am trying to connect Firebase Auth api into my application, I have followed documentation from newer updated documentation from Official site and
A user can sign in with multiple providers. Each provider generates its own unique ID for that user. You can access these under the user info for each provider.
On top of that Firebase Authentication also generates its own unique ID for the user. No matter which provider the user signed in with, they'll end up with the same UID for that. You can find this under FirebaseUser.getUid().
To identify a user, you'd normally use the value from FirebaseUser.getUid()
, so in your snippet: user.getUid()
.