0
votes

I'm looking for a safe way to store users' sensitive media like picture of driver's license. As far as I know, there is no way to access Firebase Realtime Database from Firebase Storage Rules to see if an user is authorized to view the media. Correct me if I'm wrong. There are some ways in the documentation to allow certain users to access the media, but it doesn't work out for me because there might be multiple users that will access the media and their permission status might be changed in the future.

On the other hand, there is Firebase Realtime Database. It will be secure. We can use database rules to control user access. However, there are some problems with using database like:

  • Cost
  • Latency
  • Storage size

Is there a workaround to dynamically give permissions to multiple users for accessing Firebase Storage? Or, using Firebase Realtime Database is actually fine to store images? If neither is possible, is it safe to use Firebase Storage without any additional security?

1

1 Answers

0
votes

Generally speaking, Realtime Database is not suitable for storing large binary objects like images. It's far more effective to use Cloud Storage for that.

Cloud Storage for Firebase has security rules similar to Realtime Database, except they are expressed in a different language. You can protect images per-user along with Firebase Authentication. I would start with that.