You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs: fix README examples to match real APIs (tab-sync signing key, options-based persistence, query focus/reconnect refetch)
- Cross-tab sync example used nonexistent fluent methods; now uses real
properties and documents the shared-signing-key requirement
- Options-based persistence example would throw under the new integrity-check
validation; now shows EnableIntegrityCheck/SigningKey explicitly
- Query docs cover RefetchOnWindowFocus/RefetchOnReconnect (now implemented),
client-wide defaults, and scoped per-circuit caching
- README is also the NuGet package readme (PackageReadmeFile)
> **Note:** When `EnableMessageSigning` is true, supply a key all tabs share — `DeriveKeyFromOrigin = true` or a `SigningKey` from `MessageSigner.DeriveKeyFromSeed(...)`. Without one, each tab generates its own random key and signed messages from other tabs fail verification (the middleware logs a warning).
717
+
700
718
That's all the code needed. Components don't change. Sync is automatic.
// Integrity checking is on by default and requires a stable key —
1017
+
// supply one (e.g. MessageSigner.DeriveKeyFromSeed("your-app-seed"))
1018
+
// or disable it explicitly:
1019
+
EnableIntegrityCheck=false,
997
1020
TransformOnSave=state=>statewith
998
1021
{
999
1022
Password=null,
@@ -1003,6 +1026,8 @@ Use `TransformOnSave` to exclude sensitive fields from localStorage:
1003
1026
})
1004
1027
```
1005
1028
1029
+
> **Note:** Options-based persistence enables HMAC integrity checking by default. Since a random per-session key can never verify state across reloads, the store now **throws at startup** if `EnableIntegrityCheck` is true and no `SigningKey` is provided — supply a stable key via `MessageSigner.DeriveKeyFromSeed(...)` / `DeriveKeyFromPassphrase(...)`, or set `EnableIntegrityCheck = false`.
0 commit comments