'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



Solution 1:[1]

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.

Solution 2:[2]

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.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 CopsOnRoad
Solution 2 Marcel Skotnicki