0
votes

what is the difference between Idtoken() and Uid in firebase? (regarding Google Sign in)
which one should I use in firebase realtime database to store data according to user identity.
I am using android studio with java.

1
It's unclear to me what you're looking at. Please edit the question to show the code of the methods you are comparing, or links to the API documentation.Doug Stevenson

1 Answers

0
votes

They are exactly the same. auth.uid is provided for backwards compatibility (auth.token didn't used to exist in the Security Rules) and ease-of-use: sub is not a commonly understood term for an ID, whereas uid is a bit easier to understand and you don't have to dive into the token contents.