@molecule/app-auth 1.5.1 → 1.5.2

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
@@ -3,7 +3,7 @@ AUTO-GENERATED — DO NOT EDIT THIS FILE.
3
3
  Generated by `mlcl sync-docs` from the package's src/index.ts JSDoc + mlcl/registry.json.
4
4
  Edits here are overwritten on the next commit (molecule's pre-commit hook regenerates).
5
5
  To change this document, edit the module-level JSDoc in src/index.ts.
6
- Generated: 2026-10-18T07:07:01.723Z
6
+ Generated: 2026-10-18T09:07:53.544Z
7
7
  -->
8
8
 
9
9
  # @molecule/app-auth
@@ -44,6 +44,13 @@ over the network it does not, so the bug appears only on the deployed URL.
44
44
  Gate the fetch on the auth state being settled (`state.initialized`), or let
45
45
  the HTTP client do it: `@molecule/app-bonds-default-react` registers
46
46
  `whenRestored()` as the gate so every request waits for the restore.
47
+ Waiting for the restore does NOT attach its token: a separately created HTTP
48
+ client needs
49
+ `createDefaultHttpClientWithAuthBearer({ baseURL, getToken: () => authClient.getAccessToken(), authScheme })`
50
+ from `@molecule/app-bonds-default-react` plus
51
+ `setAuthGate(() => authClient.whenRestored())` from `@molecule/app-http` — or
52
+ the auth client built with `createDefaultAuthClientWithHttpSync`, which
53
+ mirrors the token into the bonded client.
47
54
 
48
55
  **`getState().status` is the session state to render, in one value.**
49
56
  `'loading'` (no decision yet) → `'authenticated'` / `'unauthenticated'`, and
package/dist/index.d.ts CHANGED
@@ -35,6 +35,13 @@
35
35
  * Gate the fetch on the auth state being settled (`state.initialized`), or let
36
36
  * the HTTP client do it: `@molecule/app-bonds-default-react` registers
37
37
  * `whenRestored()` as the gate so every request waits for the restore.
38
+ * Waiting for the restore does NOT attach its token: a separately created HTTP
39
+ * client needs
40
+ * `createDefaultHttpClientWithAuthBearer({ baseURL, getToken: () => authClient.getAccessToken(), authScheme })`
41
+ * from `@molecule/app-bonds-default-react` plus
42
+ * `setAuthGate(() => authClient.whenRestored())` from `@molecule/app-http` — or
43
+ * the auth client built with `createDefaultAuthClientWithHttpSync`, which
44
+ * mirrors the token into the bonded client.
38
45
  *
39
46
  * **`getState().status` is the session state to render, in one value.**
40
47
  * `'loading'` (no decision yet) → `'authenticated'` / `'unauthenticated'`, and
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgLG;AAEH,cAAc,sBAAsB,CAAA;AACpC,cAAc,aAAa,CAAA;AAC3B,cAAc,eAAe,CAAA;AAC7B,cAAc,YAAY,CAAA;AAC1B,cAAc,YAAY,CAAA;AAC1B,cAAc,gBAAgB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuLG;AAEH,cAAc,sBAAsB,CAAA;AACpC,cAAc,aAAa,CAAA;AAC3B,cAAc,eAAe,CAAA;AAC7B,cAAc,YAAY,CAAA;AAC1B,cAAc,YAAY,CAAA;AAC1B,cAAc,gBAAgB,CAAA"}
package/dist/index.js CHANGED
@@ -35,6 +35,13 @@
35
35
  * Gate the fetch on the auth state being settled (`state.initialized`), or let
36
36
  * the HTTP client do it: `@molecule/app-bonds-default-react` registers
37
37
  * `whenRestored()` as the gate so every request waits for the restore.
38
+ * Waiting for the restore does NOT attach its token: a separately created HTTP
39
+ * client needs
40
+ * `createDefaultHttpClientWithAuthBearer({ baseURL, getToken: () => authClient.getAccessToken(), authScheme })`
41
+ * from `@molecule/app-bonds-default-react` plus
42
+ * `setAuthGate(() => authClient.whenRestored())` from `@molecule/app-http` — or
43
+ * the auth client built with `createDefaultAuthClientWithHttpSync`, which
44
+ * mirrors the token into the bonded client.
38
45
  *
39
46
  * **`getState().status` is the session state to render, in one value.**
40
47
  * `'loading'` (no decision yet) → `'authenticated'` / `'unauthenticated'`, and
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgLG;AAEH,cAAc,sBAAsB,CAAA;AACpC,cAAc,aAAa,CAAA;AAC3B,cAAc,eAAe,CAAA;AAC7B,cAAc,YAAY,CAAA;AAC1B,cAAc,YAAY,CAAA;AAC1B,cAAc,gBAAgB,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuLG;AAEH,cAAc,sBAAsB,CAAA;AACpC,cAAc,aAAa,CAAA;AAC3B,cAAc,eAAe,CAAA;AAC7B,cAAc,YAAY,CAAA;AAC1B,cAAc,YAAY,CAAA;AAC1B,cAAc,gBAAgB,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@molecule/app-auth",
3
- "version": "1.5.1",
3
+ "version": "1.5.2",
4
4
  "description": "Client-side authentication interface for molecule.dev",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",