简体   繁体   中英

Firebase Anonymous user

I am programming an app that users will log-in to firebase anonymously,each login generate UUID , but I knew that UUID will change when the user clear the app cache or reinstall the app. how can I apply roles to each logged in user anonymously(PS: Users will never Login with user:password or Facebook just anonymously).

Since the security will be as follow:

   "root.child('users').child(auth.uid).child('paid').val() === true",
   ".write": 
   "root.child('users').child(auth.uid).child('paid').val() === true"

can I use other then auth.uid that i can link it to the anonymous user?

Thank you

我找到了一个解决方案,当我第一次从服务器中注册用户时,我给他提供一个唯一ID,每次用户从电话中登录时,它都会从我已经注册的唯一ID中过滤节点,然后检查CurrentUser.getUId不等于已注册的密钥,因此我可以删除旧节点并用新节点更新它。

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