Pranav Wadhwa
Pranav Wadhwa

Reputation: 7746

User-based Private Data on Firebase

I'm working on an iOS app that connects with Firebase. I was wondering, if it's possible to have data that a user uploads only be accessible to him/her. The docs explained how to do this for Firebase storage, but I'm not sure how to create a similar effect for the database. Is it possible to do this, or will all data be public to all users?

Additionally, if it is possible to have the data only be accessible to the specific user, will the data still be visible to me in the database?

Upvotes: 1

Views: 249

Answers (1)

Laurent
Laurent

Reputation: 14401

What you are looking for is a concept called "security rules" with Firebase. Is it available with Realtime database and Firestore.

You can restrict access as you described and data remains available to you since you will be the administrator of the database.

Upvotes: 1

Related Questions