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?