@geolonia/geonicdb-sdk 0.27.0 → 0.28.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -183,9 +183,21 @@ Notes:
183
183
  same origin keep separate sessions.
184
184
  - Persistence is best-effort: a failed IDB write (or no Web Crypto, so the
185
185
  session stays Bearer) does not break login — it just means no rehydrate.
186
+ - If IndexedDB hangs (no completion events), each persistence operation is
187
+ bounded per stage: up to **3 seconds for open + 3 seconds for transaction**
188
+ (about 6 seconds max per operation). In `login({ rememberSession: true })`,
189
+ DPoP save and cache initialization are sequential, so the path can take up to
190
+ about 18 seconds before fail-open. Login still succeeds; only persistence is
191
+ skipped, so reloading may require signing in again.
192
+ - On persistence failure the SDK also tries to clear older persisted entries,
193
+ but if the browser's IndexedDB is permanently broken this cleanup is still
194
+ best-effort (not guaranteed). On shared devices, prefer
195
+ `rememberSession: false` and clear site data when needed.
186
196
  - Opt-in by design: shared-device flows should leave `rememberSession` off.
187
197
  - iOS Safari may evict IndexedDB under ITP after 7 days of no user
188
198
  interaction with the origin.
199
+ - Concurrent session updates across multiple tabs may cause revision counter
200
+ collisions, potentially clearing the session from another tab (known limitation).
189
201
 
190
202
  ### External Token
191
203
 
@@ -494,6 +506,11 @@ if (await db.restoreSession()) {
494
506
  They are dropped on every credential change (`login()`, `setCredentials()`,
495
507
  `logout()`) and only read back by the same principal that wrote them, via
496
508
  `restoreSession()`.
509
+ - IndexedDB persistence is bounded per stage (**open up to 3 seconds + operation
510
+ up to 3 seconds**). On timeout, the SDK keeps request/session flows alive
511
+ (fail-open), leaves persistent cache disabled for the lifetime of that SDK
512
+ instance (until reload), and opens a fail-fast circuit so queued persistence
513
+ ops do not consume timeout windows.
497
514
  - Capacity / LRU follow `cacheMaxEntries`, the same as the in-memory cache.
498
515
  - In non-browser runtimes (Node, CLI) without IndexedDB the cache stays
499
516
  in-memory only — fully backward compatible.