@oxyhq/auth 2.0.6 → 2.0.8

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.7**
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,15 @@ 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
+ - `WebOxyProvider` contains a `fedcmSilentSignInAttempted` flag; `useWebSSO` has a module-level `silentSSOAttempted` Set keyed on `origin+baseURL`. Together they ensure silent SSO fires exactly once per page load, surviving unmount/remount and StrictMode.
100
+ - Token exchange requires a server-minted nonce (`POST /fedcm/nonce`) — local UUID nonces are rejected.
101
+
102
+ ## Offline-First Persistence
103
+
104
+ - `@tanstack/react-query-persist-client` + `createSyncStoragePersister` (localStorage); `WebOxyProvider` awaits `restored` before exposing the QueryClient.
105
+ - Query whitelist: `accounts`, `users`, `sessions`, `devices`, `privacy`, `payments`; mutations always persisted; 30-day TTL; 1s throttle.
106
+ - TanStack Query pinned to `^5.100`.