How do I configure replication to push/pull only the current user’s data? Do I only need to se up authentication or do I need to set up a Filter and configure the stored documents to have an “owner” property to filter against? Another alternative I’m considering is setting up the sync gateway sync function to only give access based on a uniquely identifiable document property like “owner” or “username”.
The scenario I am trying to resolve is:
- I have a mobile app in which each unique user creates their own data
- All user’s data are pushed to a single couchbase server
- I want the pull replication to only pull down data that belongs to the user of the mobile app and disregard all other users.
Does authentication even matter in this case? Other than prevent users from accessing the server?