Sync Gateway 1 user = 1 device?


I would like to be confirmed that sync gateway need to have one user defined in is json config file for each device trying to connect and sync ?

Why this question ?

I’m testing ma app in link with my client server, first I used 1 account to connect sync gateway, from 2 computers.
When I add a document from one computer, it never sync to my second computer.

So, I felt it could be because of the user has the same acount on each devices. So I uninstaled my app from one computer, and reinstaled it, and this time, I used a diffrent account.

When I add a document from one computer (the same as before), The document was sync to le second.

Before to create a new religion, I prefer to ask : 1 user = 1 device ??



No and also you don’t “have” to create any users in the SG config.json file. You can create them via Admin port 4985 via curl
Docs on Creating Users via REST:

No, one user can log into multiple devices at the same time and sync data. Take a look at the to-do training sample app here:
I’ve deployed on iOS, Android and Windows machine before as the same user and sync data.

Your Sync Gateway logs will show you what data was asked for & when.
For more details on how replication works here is

1 Like