kinto.js
                                
                                 kinto.js copied to clipboard
                                
                                    kinto.js copied to clipboard
                            
                            
                            
                        Sync status should be indexed by remote
Right now, syncing to two different remotes is impossible, because the sync status is global for all remotes. It would be good for sync status to be specific to a given remote, so that when you switch remotes, the old state doesn't confuse the sync to the new remote.
Maybe it would also make sense to scope by «user» (?). The same happens with you sync with two different users.
One challenge is how to scope by user in cases like FxA authentication, when the client might not actually know who the user actually is (it just has a Bearer token which the server uses to lookup a user IIUC).
You should use the remote user_id to achieve that. Then the scope should be the (remote_URL, user_id)
Using the remote user ID means having to ask the user "who am I?" at the beginning of every sync.
Using the remote user ID means having to ask the user "who am I?" at the beginning of every sync.
It can also be done only the first time and kept on the client side as a value using the Authorization header as a key. Then it will happens only if the first time you use a Bearer token.