问题
I am new to firebase and I am doing for chat application.
In my firebase console, I can see raw data like this. Since it is private information, can I hide some info (or all)?
If I cannot hide, I have used encryption for "text". So, in my mobile device, I encrypt and decrypt. It is still okay. Problem is I cannot search/query text because it is already encrypted in server. How shall I do?
If I can just hide data in firebase console, I don't need to do encryption, etc already. Purpose is to prevent developer (like me) to see user data.
回答1:
There is no way to hide certain data in the Firebase console. The only thing you can do is revoke the permission of the developer to see the database altogether.
Doing client-side encryption/decryption (also known as end-to-end encryption) is a common solution for your scenario. But that does mean that your searches will also need to search for encrypted values.
While this is a bit tricky, it is possible and has been done by developer before you in a similar situation. If you're having trouble making it work, post a question with the minimal code that reproduces where got stuck and we'll have a look.
来源:https://stackoverflow.com/questions/50984043/hide-data-in-firebase-console