Closed grgbkr closed 2 years ago
This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.
🔍 Inspect: https://vercel.com/rocicorp/replicache/FyLJ6faiZ7xAy2RyqAArFbGN7uF8
✅ Preview: https://replicache-git-grgbkr-sdd-name-to-user-id-rocicorp.vercel.app
Nit: @arv has in the past pestered me to use my own fork for PR branches. Forwarding the pester (assuming we are still doing that).
Note: I pushed a new version of this change fixing the conflict.
Nit: @arv has in the past pestered me to use my own fork for PR branches. Forwarding the pester (assuming we are still doing that).
That is the common way but I think now that we depend on secrets in GH actions I do not think that works. Given that, putting branches on rocicorp/replicache is unavoidable, but please name them username/description
and delete them when done.
Problem It is important, but not obvious that
ReplicacheOptions.name
uniquely identifies the user, authenticates the same user asReplicacheOptions.auth
, and thatReplicacheOptions.auth
of a Replicache instance can be used to push the mutations of other Replicache instances with the same name.Solution Rename
ReplicacheOptions.name
toReplicacheOptions.userID
, and document its uses. DeprecateReplicache.name
in favor ofReplicache.userID
.BREAKING CHANGE: Use of
ReplicacheOptions.name
must be replaced withReplicacheOptions.userID
.