firebase auth UID是否会过期?

时间:2017-08-04 11:01:10

标签: android firebase firebase-authentication backend

我正在为我的后端网络服务中使用auth.UID作为每个用户的api_key进行操作

如果UID是最终密钥或者它已过期/更改

,我会更聪明

enter image description here

2 个答案:

答案 0 :(得分:2)

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.

答案 1 :(得分:1)

除了@AlexMamo回答之外,我发现 auth.UID 会在用户匿名登录的情况下清除应用的数据时到期。 (注意:卸载也会清除应用程序的数据)

由于声誉点无法发表评论。