简体   繁体   中英

What is difference between IdToken() and Uid() in firebase

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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM