Does firebase auth UID expires or not?

自作多情 提交于 2021-02-05 04:55:52

问题


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


回答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 posibility to delete their accounts, if they will sing 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.




回答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.



来源:https://stackoverflow.com/questions/45505131/does-firebase-auth-uid-expires-or-not

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!