Search code examples
couchdbreplicationpouchdb

How can I filter data during replication and give user only his own documents?


I need to sync server data from CouchDB and PouchDB on client side. Every user has his own data. When he is online this data is being updated. How can I filter data during replication and give user only his own documents? This is security issue for me.


Solution

  • Currently the best practice for doing private user data in PouchDB/CouchDB is to give each user their own database on the server side. I have some instructions here for how to do this.