Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does firebase auth UID expires or not?

I'm goning to use auth.UID in my backend web service as api_key for each user

I wounder if UID is final key or it expires/changes

enter image description here

like image 965
Maher Tag Avatar asked Aug 04 '17 11:08

Maher Tag


2 Answers

The auth.UID will never expire. One thing to keep in mind is that the auth.UID will always be the same only if the user does not delete his account. If you let the users the possibility to delete their accounts, if they will sign in again into your app, another UID will be generated, which will be different from the first one. Not every time the UID is a good solution for identifying a user.

like image 197
Alex Mamo Avatar answered Sep 24 '22 18:09

Alex Mamo


I addition to @AlexMamo answer, I found that auth.UID expires when app's data is cleared in scenario when user is signed in anonymously. (note: uninstalling clears app's data too)

Could not comment due to reputation points.

like image 28
Marcel Skotnicki Avatar answered Sep 22 '22 18:09

Marcel Skotnicki