fireproof-storage / fireproof

Realtime database, runs anywhere. Install Fireproof in your front-end app or edge function, and sync data via any backend.
https://fireproof.storage
Other
219 stars 16 forks source link

key mismatch on connect #30

Open jchris opened 9 months ago

jchris commented 9 months ago

We need to decide on the best practice for what to do when a user connects to a cloud database for the first time but already has local data. The local data will have a different key from the cloud database, so it throws an error.

The current best option I can think of is to have the remote connect to a new database, and then copy the events from the local into the new database. But without proper API consideration this could end up unexpectedly sharing user data with a shared cloud instance.

jchris commented 9 months ago

defer to remote key should be the default option, but it should be document that security-concious apps should configure it otherwise