utils/crdt_sync_dart/lib/src
Krzysztof kuhy Rudnicki 5f64a8959b
Some checks failed
crdt-sync pre-commit / pre-commit (push) Has been cancelled
crdt-sync tests / test (3.10) (push) Has been cancelled
crdt-sync tests / test (3.11) (push) Has been cancelled
crdt-sync tests / test (3.12) (push) Has been cancelled
Sign in with Google, and stop trusting a revoked session
Two changes to the shared sync credential path, both driven by devices
that reported "Connected" while every sync failed.

Google sign-in (signInWithGoogle, both languages) replaces typing the
sync account's password on a fresh install. The account is linked once
from the PC with tool/link_google.py, which asserts the pinned uid --
without that assertion an unlinked identity is *signed up* rather than
refused, and the new uid is then denied every read and write by the
security rules.

The second change is the one with teeth. hasSession() is a presence
check, so a refresh token the server had revoked still read as a live
session: the desktop todo build showed "Connected" and then failed every
sync with `HTTP 400 (TOKEN_EXPIRED)`. A refresh that fails for a terminal
reason now clears the stored session, so hasSession() answers honestly.

Deliberately narrow: only TOKEN_EXPIRED, USER_DISABLED, USER_NOT_FOUND,
INVALID_REFRESH_TOKEN, INVALID_GRANT_TYPE and MISSING_REFRESH_TOKEN
clear it. A network error or a 5xx must not -- a device that signs
itself out whenever the wifi drops needs a manual sign-in on every
device to recover, which is worse than the stale banner this fixes.
Verified against the live endpoint, not just mocks: has_session flips
True -> False on a real rejection.

crdt_sync_dart 0.9.0 -> 0.10.0; the five apps pin the matching tag.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0192EkoAyFBEWTvAN5vVgmSy
2026-08-11 23:58:02 +02:00
..
device.dart Add DeviceIdentity and a legacy device id for the uuid migration 2026-08-09 16:54:33 +02:00
firebase_account_provisioning.dart Let a desktop wrapper provision the sync account, no UI required 2026-08-09 21:33:22 +02:00
firebase_auth_rest.dart Sign in with Google, and stop trusting a revoked session 2026-08-11 23:58:02 +02:00
firebase_client.dart crdt_sync: add a Firebase Realtime Database transport behind a RemoteStore seam 2026-08-03 18:14:25 +02:00
firebase_config.dart Sign in with Google, and stop trusting a revoked session 2026-08-11 23:58:02 +02:00
firebase_settings.dart crdt_sync_dart 0.6.0: split Firebase settings by what is safe to publish 2026-08-04 23:05:13 +02:00
github_client.dart crdt_sync: add a Firebase Realtime Database transport behind a RemoteStore seam 2026-08-03 18:14:25 +02:00
hlc.dart Initial implementation: unified CRDT merge scheme + GitHub sync transport 2026-07-05 20:48:07 +02:00
io_store.dart Add LogStore local-persistence layer to crdt_sync (v0.2.0) 2026-07-11 22:19:34 +02:00
log.dart Initial implementation: unified CRDT merge scheme + GitHub sync transport 2026-07-05 20:48:07 +02:00
mirror_store.dart Let a mirror read survive the primary being down 2026-08-10 14:30:29 +02:00
record.dart Fix wire-format key mismatch with Python (deletedHlc -> deleted_hlc) 2026-07-05 20:55:22 +02:00
remote_store.dart crdt_sync: add a Firebase Realtime Database transport behind a RemoteStore seam 2026-08-03 18:14:25 +02:00
secure_credential_store.dart crdt_sync_dart 0.5.1: a shared secure credential store 2026-08-04 23:01:54 +02:00
store.dart Add LogStore local-persistence layer to crdt_sync (v0.2.0) 2026-07-11 22:19:34 +02:00
sync.dart Add DeviceIdentity and a legacy device id for the uuid migration 2026-08-09 16:54:33 +02:00