@oxyhq/auth 2.0.7 → 2.0.9

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
@@ -2,10 +2,12 @@
2
2
 
3
3
  OxyHQ Web Auth SDK. Headless React hooks for web applications. Zero React Native or Expo dependencies.
4
4
 
5
+ **Current published version: 2.0.8**
6
+
5
7
  ## Installation
6
8
 
7
9
  ```bash
8
- npm install @oxyhq/auth
10
+ bun add @oxyhq/auth
9
11
  ```
10
12
 
11
13
  ### Peer Dependencies
@@ -90,3 +92,16 @@ v1.x required passing 8+ props manually. In v2.0 all state is derived from conte
90
92
  - });
91
93
  + useSessionSocket();
92
94
  ```
95
+
96
+ ## FedCM (`useWebSSO`, `WebOxyProvider`)
97
+
98
+ - Use W3C-spec `mode` values `'active'` / `'passive'`. The legacy `'button'` / `'widget'` values throw `TypeError` in current Chrome.
99
+ - **Silent SSO guard is centralized in `@oxyhq/core`** (`OxyServices.silentSignInWithFedCM()`). `useWebSSO` no longer owns a cross-mount guard — it keeps only a per-instance `hasCheckedRef` to skip redundant renders within the same mount.
100
+ - `WebOxyProvider` retains its own guard (keyed `origin+baseURL`) because its silent path also runs the `oxyServices.silentSignIn()` iframe/popup fallback, which the core FedCM memo does not cover.
101
+ - Token exchange requires a server-minted nonce (`POST /fedcm/nonce`) — local UUID nonces are rejected.
102
+
103
+ ## Offline-First Persistence
104
+
105
+ - `@tanstack/react-query-persist-client` + `createSyncStoragePersister` (localStorage); `WebOxyProvider` awaits `restored` before exposing the QueryClient.
106
+ - Query whitelist: `accounts`, `users`, `sessions`, `devices`, `privacy`, `payments`; mutations always persisted; 30-day TTL; 1s throttle.
107
+ - TanStack Query pinned to `^5.100`.