Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

firebase storage and database rules communication

i need to store certain variables in the database and in the storage. but is important to have the certainty that this variables will be saved in the two databases and not only in one, furthermore this variables must be have the same values. but i see that storage and database not are in communication. how do I fix this?

like image 383
DThink Avatar asked Jul 05 '16 22:07

DThink


People also ask

What security rules are used for when accessing Cloud Storage through the Firebase console?

Firebase Security Rules for Cloud Storage ties in to Firebase Authentication for user based security. When a user is authenticated with Firebase Authentication, the request. auth variable in Cloud Storage Security Rules becomes an object that contains the user's unique ID ( request.

Does firebase Admin bypass rules?

1. Admin SDK bypasses security rules. As you explore security rules in depth, you will eventually discover that requests from the Firebase Admin SDK are not gated by rules. The Admin SDK is initialized with a service account, which gives the SDK full access to your data.

How do I set rules in Firebase Storage?

To access your rules from the Firebase console, select your project, then in the left-hand navigation panel, click Storage. Click Rules once you're in the correct database or storage bucket. To access your rules from the Firebase CLI, go to the rules file noted in your firebase. json file.

What are Rules in Firebase Realtime Database?

Firebase Realtime Database Security Rules determine who has read and write access to your database, how your data is structured, and what indexes exist. These rules live on the Firebase servers and are enforced automatically at all times. Every read and write request will only be completed if your rules allow it.


1 Answers

The short answer is that currently, security rules from one service can't access data from another service. See this thread for more info (similar general problem).

If the data you're hoping to share is user specific, you can mint custom tokens which contain this data, that can be shared across services (as both services get the same token).

like image 74
Mike McDonald Avatar answered Oct 17 '22 21:10

Mike McDonald