@molecule/app-react 1.6.5 → 1.6.7
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 +230 -121
- package/dist/contexts.d.ts +1 -1
- package/dist/contexts.d.ts.map +1 -1
- package/dist/hooks/useAuth.d.ts +16 -2
- package/dist/hooks/useAuth.d.ts.map +1 -1
- package/dist/hooks/useAuth.js +23 -2
- package/dist/hooks/useAuth.js.map +1 -1
- package/dist/hooks/useLogin.d.ts +4 -0
- package/dist/hooks/useLogin.d.ts.map +1 -1
- package/dist/hooks/useLogin.js +4 -0
- package/dist/hooks/useLogin.js.map +1 -1
- package/dist/index.d.ts +14 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +14 -0
- package/dist/index.js.map +1 -1
- package/dist/types.d.ts +18 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +2 -2
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-
|
|
6
|
+
Generated: 2026-10-19T22:40:47.087Z
|
|
7
7
|
-->
|
|
8
8
|
|
|
9
9
|
# @molecule/app-react
|
|
@@ -86,6 +86,11 @@ Reactive authentication state snapshot (initialized, authenticated, user, loadin
|
|
|
86
86
|
|
|
87
87
|
```typescript
|
|
88
88
|
interface AuthState<T = UserProfile> {
|
|
89
|
+
/**
|
|
90
|
+
* The session's state as one value — render from this instead of combining
|
|
91
|
+
* `initialized`/`authenticated`/`loading`. See {@link AuthStatus}.
|
|
92
|
+
*/
|
|
93
|
+
status: AuthStatus
|
|
89
94
|
/**
|
|
90
95
|
* Whether auth state has been initialized.
|
|
91
96
|
*/
|
|
@@ -116,120 +121,169 @@ Provides login/logout/register flows, token management, profile
|
|
|
116
121
|
updates, and auth state subscription.
|
|
117
122
|
|
|
118
123
|
```typescript
|
|
119
|
-
interface AuthClient<T = UserProfile> {
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
124
|
+
interface AuthClient<T = UserProfile, TRegister extends Record<string, unknown> = Record<never, never>> {
|
|
125
|
+
/**
|
|
126
|
+
* Returns the current authentication state snapshot.
|
|
127
|
+
*
|
|
128
|
+
* READING the state starts the client's one session restore when nobody has called
|
|
129
|
+
* {@link initialize} yet — lazily and exactly once, sharing the promise an explicit
|
|
130
|
+
* `initialize()` returns. A hook (`useAuth()`), a subscriber, `isAuthenticated()` and
|
|
131
|
+
* `getUser()` are reads too, so a client whose entry file dropped the template's
|
|
132
|
+
* `authClient.initialize()` line still restores instead of reporting `'loading'`
|
|
133
|
+
* forever.
|
|
134
|
+
*/
|
|
135
|
+
getState(): AuthState<T>;
|
|
136
|
+
/**
|
|
137
|
+
* Returns whether the user is currently authenticated.
|
|
138
|
+
*/
|
|
139
|
+
isAuthenticated(): boolean;
|
|
140
|
+
/**
|
|
141
|
+
* Gets the current user.
|
|
142
|
+
*/
|
|
143
|
+
getUser(): T | null;
|
|
144
|
+
/**
|
|
145
|
+
* Updates the cached user object (state + persistent storage) without
|
|
146
|
+
* hitting the network. Intended for local refreshes after a per-app
|
|
147
|
+
* mutation (e.g., the user just PATCHed their own profile and the
|
|
148
|
+
* server returned the canonical row). Does NOT change tokens.
|
|
149
|
+
*
|
|
150
|
+
* This does not sign the client in: `authenticated` and `status` are
|
|
151
|
+
* unchanged, so an anonymous client stays anonymous. Use
|
|
152
|
+
* {@link login} / {@link register} for a credential exchange, or
|
|
153
|
+
* {@link setSession} when the token was issued outside the client.
|
|
154
|
+
*/
|
|
155
|
+
setUser(user: T | null): void;
|
|
156
|
+
/**
|
|
157
|
+
* Gets the current access token.
|
|
158
|
+
*/
|
|
159
|
+
getAccessToken(): string | null;
|
|
160
|
+
/**
|
|
161
|
+
* Stores the access token in the configured token storage adapter (in a
|
|
162
|
+
* browser, Web Storage; `'memory'` where no browser store exists). Use this
|
|
163
|
+
* to seed the token after an out-of-band exchange (e.g. the OAuth
|
|
164
|
+
* code→token redirect) instead of writing to `localStorage` directly,
|
|
165
|
+
* which would violate the storage contract and make a stored bearer token
|
|
166
|
+
* JS-readable (XSS-exfiltratable). Pass `null` to clear it.
|
|
167
|
+
*
|
|
168
|
+
* This changes token storage only; it does not sign the client in
|
|
169
|
+
* (`authenticated` and `status` are unchanged). Use {@link login} /
|
|
170
|
+
* {@link register} for a credential exchange, or call {@link setSession}
|
|
171
|
+
* with the token and the user to establish an already-issued session.
|
|
172
|
+
*/
|
|
173
|
+
setAccessToken(token: string | null): void;
|
|
174
|
+
/**
|
|
175
|
+
* Adopts a session an out-of-band exchange already established: stores the
|
|
176
|
+
* access token (and the refresh token when given), caches the user, and
|
|
177
|
+
* sets the COMPLETE state — `initialized`, `authenticated`, `status:
|
|
178
|
+
* 'authenticated'`, no error — in one update, with one subscriber
|
|
179
|
+
* notification. Every hook reading the shared client sees the user as
|
|
180
|
+
* signed in immediately.
|
|
181
|
+
*
|
|
182
|
+
* This is the way to seed an OAuth/custom sign-in. Calling
|
|
183
|
+
* {@link setAccessToken} and {@link setUser} instead does NOT sign the
|
|
184
|
+
* client in.
|
|
185
|
+
*/
|
|
186
|
+
setSession(session: AuthSessionSeed<T>): void;
|
|
187
|
+
/**
|
|
188
|
+
* Gets the refresh token.
|
|
189
|
+
*/
|
|
190
|
+
getRefreshToken(): string | null;
|
|
191
|
+
/**
|
|
192
|
+
* Logs in with credentials.
|
|
193
|
+
*/
|
|
194
|
+
login(credentials: LoginCredentials): Promise<AuthResult<T>>;
|
|
195
|
+
/**
|
|
196
|
+
* Logs out the current user.
|
|
197
|
+
*/
|
|
198
|
+
logout(): Promise<void>;
|
|
199
|
+
/**
|
|
200
|
+
* Registers a new user. Accepts the base fields plus the app's own fields
|
|
201
|
+
* (`TRegister`) at the top level — see {@link RegisterData}.
|
|
202
|
+
*/
|
|
203
|
+
register(data: RegisterData<TRegister>): Promise<AuthResult<T>>;
|
|
204
|
+
/**
|
|
205
|
+
* Refreshes the access token.
|
|
206
|
+
*/
|
|
207
|
+
refresh(): Promise<AuthResult<T>>;
|
|
208
|
+
/**
|
|
209
|
+
* Requests a password reset.
|
|
210
|
+
*/
|
|
211
|
+
requestPasswordReset(data: PasswordResetRequest): Promise<void>;
|
|
212
|
+
/**
|
|
213
|
+
* Confirms a password reset.
|
|
214
|
+
*/
|
|
215
|
+
confirmPasswordReset(data: PasswordResetConfirm): Promise<void>;
|
|
216
|
+
/**
|
|
217
|
+
* Updates the current user's profile.
|
|
218
|
+
*/
|
|
219
|
+
updateProfile(data: Partial<T>): Promise<T>;
|
|
220
|
+
/**
|
|
221
|
+
* Changes the current user's password.
|
|
222
|
+
*/
|
|
223
|
+
changePassword(oldPassword: string, newPassword: string): Promise<void>;
|
|
224
|
+
/**
|
|
225
|
+
* Initializes auth state (e.g., from stored tokens).
|
|
226
|
+
*
|
|
227
|
+
* LAZY and IDEMPOTENT: the first read of the state ({@link getState},
|
|
228
|
+
* {@link subscribe}, `useAuth()`) starts this same restore when nobody has called
|
|
229
|
+
* `initialize()`, and every later call shares the one promise instead of sending a
|
|
230
|
+
* second request. An app that keeps the template's explicit call behaves exactly as
|
|
231
|
+
* before; an app that loses that line still restores its session.
|
|
232
|
+
*
|
|
233
|
+
* With a stored token AND a stored user it marks the session `'authenticated'`
|
|
234
|
+
* SYNCHRONOUSLY — before its first `await` — so the first render is the
|
|
235
|
+
* signed-in UI and no page waits on a verification round trip. Any check
|
|
236
|
+
* (a refresh, the cookie-restore probe) settles behind that render, and only an
|
|
237
|
+
* explicit 401/403 ends the session; a network/5xx/404 failure keeps it and
|
|
238
|
+
* reports `'unavailable'`. With no stored user the client stays `'loading'`
|
|
239
|
+
* until the cookie restore decides.
|
|
240
|
+
*
|
|
241
|
+
* Do not put this call (or a `/me` request of your own) in front of the first
|
|
242
|
+
* render, and do not render a loading screen over a session it just restored:
|
|
243
|
+
* `whenRestored()` already resolves as soon as the restore has settled, and the
|
|
244
|
+
* HTTP gate built on it holds requests for exactly that window.
|
|
245
|
+
*/
|
|
246
|
+
initialize(): Promise<void>;
|
|
247
|
+
/**
|
|
248
|
+
* Re-checks a restored session against the server, in the background — the
|
|
249
|
+
* boot-time validation an app with a stored token needs when a revoked or
|
|
250
|
+
* expired token must sign the user out. Call it AFTER the first render
|
|
251
|
+
* (`initialize()` restores synchronously from storage; this costs one request).
|
|
252
|
+
*
|
|
253
|
+
* - The server confirms the user: the session is refreshed and {@link AuthState.status}
|
|
254
|
+
* stays `'authenticated'`.
|
|
255
|
+
* - The server answers 401 or 403: the token is dead — the stored session is
|
|
256
|
+
* cleared and the status becomes `'unauthenticated'`.
|
|
257
|
+
* - The server cannot confirm the session — a network failure, a 5xx, or a 404
|
|
258
|
+
* from a misconfigured {@link AuthClientConfig.currentUserEndpoint}: the
|
|
259
|
+
* session (token AND user) is KEPT and the status becomes `'unavailable'`, so
|
|
260
|
+
* the app can retry instead of signing the user out over a bad connection or a
|
|
261
|
+
* route that does not exist. The 404 error names `currentUserEndpoint`.
|
|
262
|
+
*
|
|
263
|
+
* Do not hand-write this beside the client: a parallel token/user store for a
|
|
264
|
+
* "validating"/"unavailable" flag is the race this method removes.
|
|
265
|
+
*
|
|
266
|
+
* Optional: a provider with no restorable session has nothing to validate.
|
|
267
|
+
*/
|
|
268
|
+
validateSession?(): Promise<void>;
|
|
269
|
+
/**
|
|
270
|
+
* Resolves when the session restore started by `initialize()` has settled — the point
|
|
271
|
+
* after which the client knows whether this visitor is signed in.
|
|
272
|
+
*
|
|
273
|
+
* Resolves IMMEDIATELY when no restore is in flight: before `initialize()` is ever
|
|
274
|
+
* called, and after it has finished. A restore that failed resolves too (it settled the
|
|
275
|
+
* question), so an HTTP client can await this before every request without risking one
|
|
276
|
+
* held forever. That is what makes the fetch-before-restore race impossible: a page that
|
|
277
|
+
* fetches viewer-dependent data on mount waits here instead of going out anonymously
|
|
278
|
+
* (see `setAuthGate` in `@molecule/app-http`).
|
|
279
|
+
*
|
|
280
|
+
* Optional: a provider that restores no session has nothing to wait for. Without it, an
|
|
281
|
+
* HTTP client bonded to that provider sends first-paint requests unauthenticated.
|
|
282
|
+
*
|
|
283
|
+
* A provider whose restore sends a request THROUGH the gated HTTP client must send that
|
|
284
|
+
* request with `skipAuthGate: true` (`RequestConfig` in `@molecule/app-http`): the gate
|
|
285
|
+
* waits on this promise, so holding the restore's own request makes the gate wait on
|
|
286
|
+
// … truncated — the full declaration is in node_modules/@molecule/app-react/dist
|
|
233
287
|
```
|
|
234
288
|
|
|
235
289
|
#### `FormController`
|
|
@@ -384,7 +438,8 @@ interface HttpClient {
|
|
|
384
438
|
*/
|
|
385
439
|
defaultHeaders: Record<string, string>
|
|
386
440
|
/**
|
|
387
|
-
* Makes a generic HTTP request.
|
|
441
|
+
* Makes a generic HTTP request. `data` is a field of THIS config object — the same body
|
|
442
|
+
* `post(url, data, config)` takes as its second argument.
|
|
388
443
|
*/
|
|
389
444
|
request<T = unknown>(config: FullRequestConfig): Promise<HttpResponse<T>>
|
|
390
445
|
/**
|
|
@@ -392,15 +447,19 @@ interface HttpClient {
|
|
|
392
447
|
*/
|
|
393
448
|
get<T = unknown>(url: string, config?: RequestConfig): Promise<HttpResponse<T>>
|
|
394
449
|
/**
|
|
395
|
-
* Makes a POST request.
|
|
450
|
+
* Makes a POST request. `data` is the request BODY, not a config object: the wire body is
|
|
451
|
+
* `data` itself, so `post(url, { data: body })` sends `{"data":body}` — pass `body` directly.
|
|
452
|
+
* A config (headers, params) is the THIRD argument.
|
|
396
453
|
*/
|
|
397
454
|
post<T = unknown>(url: string, data?: unknown, config?: RequestConfig): Promise<HttpResponse<T>>
|
|
398
455
|
/**
|
|
399
|
-
* Makes a PUT request.
|
|
456
|
+
* Makes a PUT request. `data` is the request BODY (second argument) — never `{ data: body }`,
|
|
457
|
+
* which sends `{"data":body}`; a config is the THIRD argument.
|
|
400
458
|
*/
|
|
401
459
|
put<T = unknown>(url: string, data?: unknown, config?: RequestConfig): Promise<HttpResponse<T>>
|
|
402
460
|
/**
|
|
403
|
-
* Makes a PATCH request.
|
|
461
|
+
* Makes a PATCH request. `data` is the request BODY (second argument) — never `{ data: body }`,
|
|
462
|
+
* which sends `{"data":body}`; a config is the THIRD argument.
|
|
404
463
|
*/
|
|
405
464
|
patch<T = unknown>(url: string, data?: unknown, config?: RequestConfig): Promise<HttpResponse<T>>
|
|
406
465
|
/**
|
|
@@ -1206,12 +1265,30 @@ Hook result for useAuth.
|
|
|
1206
1265
|
|
|
1207
1266
|
```typescript
|
|
1208
1267
|
interface UseAuthResult<T = unknown> {
|
|
1268
|
+
/**
|
|
1269
|
+
* The session state as one value — render from this instead of combining
|
|
1270
|
+
* `initialized`/`authenticated`/`loading`. A stored token AND user make it
|
|
1271
|
+
* `'authenticated'` on the first render; only `'loading'` means "no decision
|
|
1272
|
+
* yet", so a route guard waits on that and nothing else.
|
|
1273
|
+
*/
|
|
1274
|
+
status: AuthState<T>['status']
|
|
1209
1275
|
state: AuthState<T>
|
|
1210
1276
|
login: AuthClient<T>['login']
|
|
1211
1277
|
logout: AuthClient<T>['logout']
|
|
1212
1278
|
register: AuthClient<T>['register']
|
|
1213
1279
|
refresh: AuthClient<T>['refresh']
|
|
1214
1280
|
setUser: AuthClient<T>['setUser']
|
|
1281
|
+
/**
|
|
1282
|
+
* Adopt a session an exchange outside the client already established (an
|
|
1283
|
+
* OAuth code→token redirect, the app's own sign-in endpoint) in ONE update:
|
|
1284
|
+
* the token and user are stored and the hook's consumers see the client as
|
|
1285
|
+
* `authenticated` immediately.
|
|
1286
|
+
*
|
|
1287
|
+
* `setUser` alone does NOT sign the client in, and `setAccessToken` changes
|
|
1288
|
+
* storage only — using those two for a caller-issued session leaves every
|
|
1289
|
+
* `authenticated` read signed out (xr-molecule-flash-m178).
|
|
1290
|
+
*/
|
|
1291
|
+
setSession: AuthClient<T>['setSession']
|
|
1215
1292
|
isAuthenticated: boolean
|
|
1216
1293
|
isLoading: boolean
|
|
1217
1294
|
user: T | null
|
|
@@ -1647,7 +1724,7 @@ function useAsyncState(initialState: T): [T, AsyncSetState<T>, AsyncExtendState<
|
|
|
1647
1724
|
Hook to access the auth client from context.
|
|
1648
1725
|
|
|
1649
1726
|
```typescript
|
|
1650
|
-
function useAuthClient(): AuthClient<T
|
|
1727
|
+
function useAuthClient(): AuthClient<T, Record<never, never>>
|
|
1651
1728
|
```
|
|
1652
1729
|
|
|
1653
1730
|
**Returns:** The auth client from context
|
|
@@ -1656,6 +1733,20 @@ function useAuthClient(): AuthClient<T>
|
|
|
1656
1733
|
|
|
1657
1734
|
Hook for authentication state and actions.
|
|
1658
1735
|
|
|
1736
|
+
Pass the app's user type — the SAME type used for the auth client and its
|
|
1737
|
+
config (`createJWTAuthClient<MyUser>`, `AuthClientConfig<MyUser>`) — so
|
|
1738
|
+
`user` and `setSession`/`setUser` are typed for the pages:
|
|
1739
|
+
`useAuth<MyUser>()`.
|
|
1740
|
+
|
|
1741
|
+
For a sign-in the app runs itself (an OAuth redirect, a custom endpoint that
|
|
1742
|
+
already issued the token), call `setSession({ accessToken, user })`: it
|
|
1743
|
+
adopts the token and profile atomically and every consumer of this hook sees
|
|
1744
|
+
`status: 'authenticated'` at once. `setUser` alone does not sign in.
|
|
1745
|
+
|
|
1746
|
+
To create an account, use `const { register } = useAuth<MyUser>()` and
|
|
1747
|
+
`await register({ email, password, name })`. Registration returns the auth
|
|
1748
|
+
client's `AuthResult<MyUser>`; there is no separate `useRegister` hook.
|
|
1749
|
+
|
|
1659
1750
|
```typescript
|
|
1660
1751
|
function useAuth(options?: UseAuthOptions): UseAuthResult<T>
|
|
1661
1752
|
```
|
|
@@ -2002,6 +2093,10 @@ function useChildLogger(parentName: string, context: Record<string, unknown>): L
|
|
|
2002
2093
|
#### `useLogin()`
|
|
2003
2094
|
|
|
2004
2095
|
Hook for login with async state tracking.
|
|
2096
|
+
Registration is available through `const { register } = useAuth()`;
|
|
2097
|
+
call `register({ email, password, name })` to create an account. There is
|
|
2098
|
+
no separate `useRegister` hook. Use `usePromise(register)` when the form
|
|
2099
|
+
needs the same pending/error tracking as this login hook.
|
|
2005
2100
|
|
|
2006
2101
|
```typescript
|
|
2007
2102
|
function useLogin(): UseLoginReturn<T>
|
|
@@ -2739,7 +2834,7 @@ const StateContext: Context<StateProvider | null>
|
|
|
2739
2834
|
Context for authentication client.
|
|
2740
2835
|
|
|
2741
2836
|
```typescript
|
|
2742
|
-
const AuthContext: Context<AuthClient<unknown
|
|
2837
|
+
const AuthContext: Context<AuthClient<unknown, Record<never, never>> | null>
|
|
2743
2838
|
```
|
|
2744
2839
|
|
|
2745
2840
|
#### `ThemeContext`
|
|
@@ -2882,10 +2977,24 @@ Peer dependencies:
|
|
|
2882
2977
|
"useXProvider must be used within an XProvider" means the matching prop (or individual
|
|
2883
2978
|
provider component) is missing ABOVE the component that calls the hook — fix the wiring,
|
|
2884
2979
|
never wrap the hook in try/catch.
|
|
2980
|
+
- **`useAuth().setSession({ accessToken, user })` adopts a caller-issued session.** For a
|
|
2981
|
+
custom sign-in exchange (an OAuth redirect, the app's own endpoint that already returned
|
|
2982
|
+
the token and profile), this stores the token and user and flips the shared client to
|
|
2983
|
+
`authenticated` in ONE update, so every component reading the hook sees the signed-in
|
|
2984
|
+
state immediately. `setUser` alone does not sign in, and `setAccessToken` changes storage
|
|
2985
|
+
only. Type the hook with the app's profile (`useAuth<MyUser>()`) as well as the client
|
|
2986
|
+
and its config, so the session seed and `user` carry the app's own fields.
|
|
2885
2987
|
- **Locale-reactive text requires the hook.** Inside components always read `t` from
|
|
2886
2988
|
`useTranslation()` (or `useT()`); it re-renders on `onLocaleChange` — even when
|
|
2887
2989
|
`addTranslations()` only adds keys for the current locale. Calling the raw `t()` import from
|
|
2888
2990
|
`@molecule/app-i18n` in render works once but leaves stale text after a locale switch.
|
|
2991
|
+
- **Load a page's data with `useQuery` from `@molecule/app-query-react`, never with `fetch` in a
|
|
2992
|
+
`useEffect`.** A hand-written load effect that cancels on cleanup (a `cancelled` flag or an
|
|
2993
|
+
`AbortController`) cancels its own request on every re-render when a dependency is rebuilt each
|
|
2994
|
+
render (`const [.., setError] = useApiErrors()`), and its ref guard then skips the refetch: the
|
|
2995
|
+
answer is dropped whenever it arrives after a re-render — always on a remote server, never on
|
|
2996
|
+
localhost. `useQuery` keeps one request per key and aborts it only when the key changes or the
|
|
2997
|
+
page unmounts (install `@molecule/app-query` + a bond such as `@molecule/app-query-memory`).
|
|
2889
2998
|
- **Exactly one React copy.** In workspace/symlinked dev setups a second React instance makes
|
|
2890
2999
|
every hook fail ("Invalid hook call", or the provider errors above with the provider
|
|
2891
3000
|
mounted). Scaffolded Vite configs ship
|
package/dist/contexts.d.ts
CHANGED
|
@@ -25,7 +25,7 @@ export declare const StateContext: import("react").Context<StateProvider | null>
|
|
|
25
25
|
/**
|
|
26
26
|
* Context for authentication client.
|
|
27
27
|
*/
|
|
28
|
-
export declare const AuthContext: import("react").Context<AuthClient<unknown
|
|
28
|
+
export declare const AuthContext: import("react").Context<AuthClient<unknown, Record<never, never>> | null>;
|
|
29
29
|
/**
|
|
30
30
|
* Context for theme provider.
|
|
31
31
|
*/
|
package/dist/contexts.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contexts.d.ts","sourceRoot":"","sources":["../src/contexts.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AACzD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAA;AACpD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAA;AAC/D,OAAO,KAAK,EAAE,UAAU,EA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,CAAA;AACxD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAC5D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAExD;;GAEG;AACH,eAAO,MAAM,YAAY,+CAA4C,CAAA;AAGrE;;GAEG;AACH,eAAO,MAAM,WAAW,2EAAkD,CAAA;AAG1E;;GAEG;AACH,eAAO,MAAM,YAAY,+CAA4C,CAAA;AAGrE;;GAEG;AACH,eAAO,MAAM,aAAa,wCAAqC,CAAA;AAG/D;;GAEG;AACH,eAAO,MAAM,WAAW,8CAA2C,CAAA;AAGnE;;GAEG;AACH,eAAO,MAAM,WAAW,4CAAyC,CAAA;AAGjE;;GAEG;AACH,eAAO,MAAM,cAAc,iDAA8C,CAAA;AAGzE;;GAEG;AACH,eAAO,MAAM,aAAa,gDAA6C,CAAA;AAGvE;;GAEG;AACH,eAAO,MAAM,WAAW,8CAA2C,CAAA;AAGnE;;GAEG;AACH,eAAO,MAAM,gBAAgB,mDAAgD,CAAA;AAG7E;;GAEG;AACH,eAAO,MAAM,aAAa,gDAA6C,CAAA;AAGvE;;GAEG;AACH,eAAO,MAAM,cAAc,iDAA8C,CAAA"}
|
package/dist/hooks/useAuth.d.ts
CHANGED
|
@@ -15,15 +15,29 @@ export declare function useAuthClient<T = unknown>(): AuthClient<T>;
|
|
|
15
15
|
/**
|
|
16
16
|
* Hook for authentication state and actions.
|
|
17
17
|
*
|
|
18
|
+
* Pass the app's user type — the SAME type used for the auth client and its
|
|
19
|
+
* config (`createJWTAuthClient<MyUser>`, `AuthClientConfig<MyUser>`) — so
|
|
20
|
+
* `user` and `setSession`/`setUser` are typed for the pages:
|
|
21
|
+
* `useAuth<MyUser>()`.
|
|
22
|
+
*
|
|
23
|
+
* For a sign-in the app runs itself (an OAuth redirect, a custom endpoint that
|
|
24
|
+
* already issued the token), call `setSession({ accessToken, user })`: it
|
|
25
|
+
* adopts the token and profile atomically and every consumer of this hook sees
|
|
26
|
+
* `status: 'authenticated'` at once. `setUser` alone does not sign in.
|
|
27
|
+
*
|
|
28
|
+
* To create an account, use `const { register } = useAuth<MyUser>()` and
|
|
29
|
+
* `await register({ email, password, name })`. Registration returns the auth
|
|
30
|
+
* client's `AuthResult<MyUser>`; there is no separate `useRegister` hook.
|
|
31
|
+
*
|
|
18
32
|
* @param options - Hook options
|
|
19
33
|
* @returns Auth state and action methods
|
|
20
34
|
*
|
|
21
35
|
* @example
|
|
22
36
|
* ```tsx
|
|
23
|
-
* const { user, isAuthenticated, login, logout } = useAuth()
|
|
37
|
+
* const { user, isAuthenticated, login, logout } = useAuth<{ id: string; name?: string }>()
|
|
24
38
|
*
|
|
25
39
|
* if (isAuthenticated) {
|
|
26
|
-
* return <div>Welcome, {user
|
|
40
|
+
* return <div>Welcome, {user?.name}!</div>
|
|
27
41
|
* }
|
|
28
42
|
* ```
|
|
29
43
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useAuth.d.ts","sourceRoot":"","sources":["../../src/hooks/useAuth.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"useAuth.d.ts","sourceRoot":"","sources":["../../src/hooks/useAuth.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,KAAK,EACV,UAAU,EAKX,MAAM,oBAAoB,CAAA;AAI3B,OAAO,KAAK,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAEhE;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,CAAC,GAAG,OAAO,KAAK,UAAU,CAAC,CAAC,CAAC,CAU1D;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,wBAAgB,OAAO,CAAC,CAAC,GAAG,OAAO,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,aAAa,CAAC,CAAC,CAAC,CA2E/E;AAED;;;;GAIG;AACH,wBAAgB,OAAO,CAAC,CAAC,GAAG,OAAO,KAAK,CAAC,GAAG,IAAI,CAG/C;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,IAAI,OAAO,CAG5C"}
|
package/dist/hooks/useAuth.js
CHANGED
|
@@ -24,15 +24,29 @@ export function useAuthClient() {
|
|
|
24
24
|
/**
|
|
25
25
|
* Hook for authentication state and actions.
|
|
26
26
|
*
|
|
27
|
+
* Pass the app's user type — the SAME type used for the auth client and its
|
|
28
|
+
* config (`createJWTAuthClient<MyUser>`, `AuthClientConfig<MyUser>`) — so
|
|
29
|
+
* `user` and `setSession`/`setUser` are typed for the pages:
|
|
30
|
+
* `useAuth<MyUser>()`.
|
|
31
|
+
*
|
|
32
|
+
* For a sign-in the app runs itself (an OAuth redirect, a custom endpoint that
|
|
33
|
+
* already issued the token), call `setSession({ accessToken, user })`: it
|
|
34
|
+
* adopts the token and profile atomically and every consumer of this hook sees
|
|
35
|
+
* `status: 'authenticated'` at once. `setUser` alone does not sign in.
|
|
36
|
+
*
|
|
37
|
+
* To create an account, use `const { register } = useAuth<MyUser>()` and
|
|
38
|
+
* `await register({ email, password, name })`. Registration returns the auth
|
|
39
|
+
* client's `AuthResult<MyUser>`; there is no separate `useRegister` hook.
|
|
40
|
+
*
|
|
27
41
|
* @param options - Hook options
|
|
28
42
|
* @returns Auth state and action methods
|
|
29
43
|
*
|
|
30
44
|
* @example
|
|
31
45
|
* ```tsx
|
|
32
|
-
* const { user, isAuthenticated, login, logout } = useAuth()
|
|
46
|
+
* const { user, isAuthenticated, login, logout } = useAuth<{ id: string; name?: string }>()
|
|
33
47
|
*
|
|
34
48
|
* if (isAuthenticated) {
|
|
35
|
-
* return <div>Welcome, {user
|
|
49
|
+
* return <div>Welcome, {user?.name}!</div>
|
|
36
50
|
* }
|
|
37
51
|
* ```
|
|
38
52
|
*/
|
|
@@ -45,6 +59,7 @@ export function useAuth(options) {
|
|
|
45
59
|
const next = client.getState();
|
|
46
60
|
const prev = cachedStateRef.current;
|
|
47
61
|
if (prev !== null &&
|
|
62
|
+
prev.status === next.status &&
|
|
48
63
|
prev.initialized === next.initialized &&
|
|
49
64
|
prev.authenticated === next.authenticated &&
|
|
50
65
|
prev.user === next.user &&
|
|
@@ -73,13 +88,19 @@ export function useAuth(options) {
|
|
|
73
88
|
const register = useCallback((data) => client.register(data), [client]);
|
|
74
89
|
const refresh = useCallback(() => client.refresh(), [client]);
|
|
75
90
|
const setUser = useCallback((user) => client.setUser(user), [client]);
|
|
91
|
+
const setSession = useCallback((session) => client.setSession(session), [client]);
|
|
76
92
|
return {
|
|
93
|
+
// The single value to render from. A stored token AND user make it
|
|
94
|
+
// `'authenticated'` on the FIRST render (the client restores synchronously);
|
|
95
|
+
// only `'loading'` means no decision yet, so a guard waits on that alone.
|
|
96
|
+
status: state.status,
|
|
77
97
|
state,
|
|
78
98
|
login,
|
|
79
99
|
logout,
|
|
80
100
|
register,
|
|
81
101
|
refresh,
|
|
82
102
|
setUser,
|
|
103
|
+
setSession,
|
|
83
104
|
isAuthenticated: state.authenticated,
|
|
84
105
|
isLoading: state.loading,
|
|
85
106
|
user: state.user,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useAuth.js","sourceRoot":"","sources":["../../src/hooks/useAuth.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,EAAE,oBAAoB,EAAE,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"useAuth.js","sourceRoot":"","sources":["../../src/hooks/useAuth.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,EAAE,oBAAoB,EAAE,MAAM,OAAO,CAAA;AASxF,OAAO,EAAE,CAAC,EAAE,MAAM,oBAAoB,CAAA;AAEtC,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AAG5C;;;;;GAKG;AACH,MAAM,UAAU,aAAa;IAC3B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,WAAW,CAC5B,CAAC,OAA2B,EAAE,EAAE,CAAC,MAAM,CAAC,UAAU,CAAC,OAAO,CAAC,EAC3D,CAAC,MAAM,CAAC,CACT,CAAA;IAED,OAAO;QACL,mEAAmE;QACnE,6EAA6E;QAC7E,0EAA0E;QAC1E,MAAM,EAAE,KAAK,CAAC,MAAM;QACpB,KAAK;QACL,KAAK;QACL,MAAM;QACN,QAAQ;QACR,OAAO;QACP,OAAO;QACP,UAAU;QACV,eAAe,EAAE,KAAK,CAAC,aAAa;QACpC,SAAS,EAAE,KAAK,CAAC,OAAO;QACxB,IAAI,EAAE,KAAK,CAAC,IAAI;KACjB,CAAA;AACH,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,OAAO;IACrB,MAAM,EAAE,IAAI,EAAE,GAAG,OAAO,EAAK,CAAA;IAC7B,OAAO,IAAI,CAAA;AACb,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,kBAAkB;IAChC,MAAM,EAAE,eAAe,EAAE,GAAG,OAAO,EAAE,CAAA;IACrC,OAAO,eAAe,CAAA;AACxB,CAAC"}
|
package/dist/hooks/useLogin.d.ts
CHANGED
|
@@ -17,6 +17,10 @@ export interface UseLoginReturn<T = unknown> {
|
|
|
17
17
|
}
|
|
18
18
|
/**
|
|
19
19
|
* Hook for login with async state tracking.
|
|
20
|
+
* Registration is available through `const { register } = useAuth()`;
|
|
21
|
+
* call `register({ email, password, name })` to create an account. There is
|
|
22
|
+
* no separate `useRegister` hook. Use `usePromise(register)` when the form
|
|
23
|
+
* needs the same pending/error tracking as this login hook.
|
|
20
24
|
*
|
|
21
25
|
* @returns Login state and action
|
|
22
26
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useLogin.d.ts","sourceRoot":"","sources":["../../src/hooks/useLogin.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,KAAK,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AAGtE,OAAO,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wBAAgB,QAAQ,CAAC,CAAC,GAAG,OAAO,KAAK,cAAc,CAAC,CAAC,CAAC,CAiBzD"}
|
package/dist/hooks/useLogin.js
CHANGED
|
@@ -8,6 +8,10 @@ import { useAuthClient } from './useAuth.js';
|
|
|
8
8
|
import { usePromise } from './usePromise.js';
|
|
9
9
|
/**
|
|
10
10
|
* Hook for login with async state tracking.
|
|
11
|
+
* Registration is available through `const { register } = useAuth()`;
|
|
12
|
+
* call `register({ email, password, name })` to create an account. There is
|
|
13
|
+
* no separate `useRegister` hook. Use `usePromise(register)` when the form
|
|
14
|
+
* needs the same pending/error tracking as this login hook.
|
|
11
15
|
*
|
|
12
16
|
* @returns Login state and action
|
|
13
17
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useLogin.js","sourceRoot":"","sources":["../../src/hooks/useLogin.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAA;AAInC,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAA;AAC5C,OAAO,EAAE,UAAU,EAAwB,MAAM,iBAAiB,CAAA;AAalE
|
|
1
|
+
{"version":3,"file":"useLogin.js","sourceRoot":"","sources":["../../src/hooks/useLogin.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAA;AAInC,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAA;AAC5C,OAAO,EAAE,UAAU,EAAwB,MAAM,iBAAiB,CAAA;AAalE;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,UAAU,QAAQ;IACtB,MAAM,MAAM,GAAG,aAAa,EAAK,CAAA;IAEjC,MAAM,OAAO,GAAG,WAAW,CACzB,CAAC,WAA6B,EAAE,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,WAAW,CAAC,EAC5D,CAAC,MAAM,CAAC,CACT,CAAA;IAED,MAAM,CAAC,KAAK,EAAE,IAAI,CAAC,GAAG,UAAU,CAAC,OAAO,CAAC,CAAA;IAEzC,OAAO;QACL,MAAM,EAAE,KAAK,CAAC,MAAM;QACpB,KAAK,EAAE,KAAK,CAAC,KAAK;QAClB,KAAK,EAAE,KAAK,CAAC,KAAK;QAClB,KAAK,EAAE,IAAI;QACX,KAAK,EAAE,KAAK,CAAC,KAAK;KACnB,CAAA;AACH,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -56,10 +56,24 @@
|
|
|
56
56
|
* "useXProvider must be used within an XProvider" means the matching prop (or individual
|
|
57
57
|
* provider component) is missing ABOVE the component that calls the hook — fix the wiring,
|
|
58
58
|
* never wrap the hook in try/catch.
|
|
59
|
+
* - **`useAuth().setSession({ accessToken, user })` adopts a caller-issued session.** For a
|
|
60
|
+
* custom sign-in exchange (an OAuth redirect, the app's own endpoint that already returned
|
|
61
|
+
* the token and profile), this stores the token and user and flips the shared client to
|
|
62
|
+
* `authenticated` in ONE update, so every component reading the hook sees the signed-in
|
|
63
|
+
* state immediately. `setUser` alone does not sign in, and `setAccessToken` changes storage
|
|
64
|
+
* only. Type the hook with the app's profile (`useAuth<MyUser>()`) as well as the client
|
|
65
|
+
* and its config, so the session seed and `user` carry the app's own fields.
|
|
59
66
|
* - **Locale-reactive text requires the hook.** Inside components always read `t` from
|
|
60
67
|
* `useTranslation()` (or `useT()`); it re-renders on `onLocaleChange` — even when
|
|
61
68
|
* `addTranslations()` only adds keys for the current locale. Calling the raw `t()` import from
|
|
62
69
|
* `@molecule/app-i18n` in render works once but leaves stale text after a locale switch.
|
|
70
|
+
* - **Load a page's data with `useQuery` from `@molecule/app-query-react`, never with `fetch` in a
|
|
71
|
+
* `useEffect`.** A hand-written load effect that cancels on cleanup (a `cancelled` flag or an
|
|
72
|
+
* `AbortController`) cancels its own request on every re-render when a dependency is rebuilt each
|
|
73
|
+
* render (`const [.., setError] = useApiErrors()`), and its ref guard then skips the refetch: the
|
|
74
|
+
* answer is dropped whenever it arrives after a re-render — always on a remote server, never on
|
|
75
|
+
* localhost. `useQuery` keeps one request per key and aborts it only when the key changes or the
|
|
76
|
+
* page unmounts (install `@molecule/app-query` + a bond such as `@molecule/app-query-memory`).
|
|
63
77
|
* - **Exactly one React copy.** In workspace/symlinked dev setups a second React instance makes
|
|
64
78
|
* every hook fail ("Invalid hook call", or the provider errors above with the provider
|
|
65
79
|
* mounted). Scaffolded Vite configs ship
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsGG;AAEH,cAAc,qBAAqB,CAAA;AACnC,cAAc,eAAe,CAAA;AAC7B,cAAc,kBAAkB,CAAA;AAChC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,YAAY,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -56,10 +56,24 @@
|
|
|
56
56
|
* "useXProvider must be used within an XProvider" means the matching prop (or individual
|
|
57
57
|
* provider component) is missing ABOVE the component that calls the hook — fix the wiring,
|
|
58
58
|
* never wrap the hook in try/catch.
|
|
59
|
+
* - **`useAuth().setSession({ accessToken, user })` adopts a caller-issued session.** For a
|
|
60
|
+
* custom sign-in exchange (an OAuth redirect, the app's own endpoint that already returned
|
|
61
|
+
* the token and profile), this stores the token and user and flips the shared client to
|
|
62
|
+
* `authenticated` in ONE update, so every component reading the hook sees the signed-in
|
|
63
|
+
* state immediately. `setUser` alone does not sign in, and `setAccessToken` changes storage
|
|
64
|
+
* only. Type the hook with the app's profile (`useAuth<MyUser>()`) as well as the client
|
|
65
|
+
* and its config, so the session seed and `user` carry the app's own fields.
|
|
59
66
|
* - **Locale-reactive text requires the hook.** Inside components always read `t` from
|
|
60
67
|
* `useTranslation()` (or `useT()`); it re-renders on `onLocaleChange` — even when
|
|
61
68
|
* `addTranslations()` only adds keys for the current locale. Calling the raw `t()` import from
|
|
62
69
|
* `@molecule/app-i18n` in render works once but leaves stale text after a locale switch.
|
|
70
|
+
* - **Load a page's data with `useQuery` from `@molecule/app-query-react`, never with `fetch` in a
|
|
71
|
+
* `useEffect`.** A hand-written load effect that cancels on cleanup (a `cancelled` flag or an
|
|
72
|
+
* `AbortController`) cancels its own request on every re-render when a dependency is rebuilt each
|
|
73
|
+
* render (`const [.., setError] = useApiErrors()`), and its ref guard then skips the refetch: the
|
|
74
|
+
* answer is dropped whenever it arrives after a re-render — always on a remote server, never on
|
|
75
|
+
* localhost. `useQuery` keeps one request per key and aborts it only when the key changes or the
|
|
76
|
+
* page unmounts (install `@molecule/app-query` + a bond such as `@molecule/app-query-memory`).
|
|
63
77
|
* - **Exactly one React copy.** In workspace/symlinked dev setups a second React instance makes
|
|
64
78
|
* every hook fail ("Invalid hook call", or the provider errors above with the provider
|
|
65
79
|
* mounted). Scaffolded Vite configs ship
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsGG;AAEH,cAAc,qBAAqB,CAAA;AACnC,cAAc,eAAe,CAAA;AAC7B,cAAc,kBAAkB,CAAA;AAChC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,YAAY,CAAA"}
|
package/dist/types.d.ts
CHANGED
|
@@ -133,12 +133,30 @@ export interface UseAuthOptions {
|
|
|
133
133
|
* Hook result for useAuth.
|
|
134
134
|
*/
|
|
135
135
|
export interface UseAuthResult<T = unknown> {
|
|
136
|
+
/**
|
|
137
|
+
* The session state as one value — render from this instead of combining
|
|
138
|
+
* `initialized`/`authenticated`/`loading`. A stored token AND user make it
|
|
139
|
+
* `'authenticated'` on the first render; only `'loading'` means "no decision
|
|
140
|
+
* yet", so a route guard waits on that and nothing else.
|
|
141
|
+
*/
|
|
142
|
+
status: AuthState<T>['status'];
|
|
136
143
|
state: AuthState<T>;
|
|
137
144
|
login: AuthClient<T>['login'];
|
|
138
145
|
logout: AuthClient<T>['logout'];
|
|
139
146
|
register: AuthClient<T>['register'];
|
|
140
147
|
refresh: AuthClient<T>['refresh'];
|
|
141
148
|
setUser: AuthClient<T>['setUser'];
|
|
149
|
+
/**
|
|
150
|
+
* Adopt a session an exchange outside the client already established (an
|
|
151
|
+
* OAuth code→token redirect, the app's own sign-in endpoint) in ONE update:
|
|
152
|
+
* the token and user are stored and the hook's consumers see the client as
|
|
153
|
+
* `authenticated` immediately.
|
|
154
|
+
*
|
|
155
|
+
* `setUser` alone does NOT sign the client in, and `setAccessToken` changes
|
|
156
|
+
* storage only — using those two for a caller-issued session leaves every
|
|
157
|
+
* `authenticated` read signed out (xr-molecule-flash-m178).
|
|
158
|
+
*/
|
|
159
|
+
setSession: AuthClient<T>['setSession'];
|
|
142
160
|
isAuthenticated: boolean;
|
|
143
161
|
isLoading: boolean;
|
|
144
162
|
user: T | null;
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEtC,OAAO,KAAK,EACV,mBAAmB,EACnB,cAAc,EACd,WAAW,EACX,YAAY,EACZ,eAAe,EAChB,MAAM,uBAAuB,CAAA;AAC9B,OAAO,KAAK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,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAA;IACxD,WAAW,EAAE,CAAC,QAAQ,EAAE,CAAC,OAAO,EAAE,gBAAgB,KAAK,IAAI,KAAK,MAAM,IAAI,CAAA;CAC3E;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,YAAY,CAAA;IACnB,MAAM,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAA;IAC7B,OAAO,EAAE,MAAM,IAAI,CAAA;IACnB,SAAS,EAAE,CAAC,MAAM,EAAE,WAAW,KAAK,IAAI,CAAA;IACxC,YAAY,EAAE,MAAM,IAAI,CAAA;IACxB;;;;;;OAMG;IACH,gBAAgB,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,OAAO,KAAK,IAAI,CAAA;IAC5D,6EAA6E;IAC7E,IAAI,EAAE,MAAM,IAAI,CAAA;IAChB,4EAA4E;IAC5E,OAAO,EAAE,MAAM,IAAI,CAAA;CACpB;AAMD,YAAY,EACV,UAAU,EACV,SAAS,EACT,cAAc,EACd,WAAW,EACX,UAAU,EACV,MAAM,EACN,YAAY,EACZ,KAAK,EACL,WAAW,EACX,KAAK,GACN,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@molecule/app-react",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.7",
|
|
4
4
|
"description": "React framework bindings for molecule.dev",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
},
|
|
60
60
|
"devDependencies": {
|
|
61
61
|
"@molecule/app-ai-models": "1.4.0",
|
|
62
|
-
"@molecule/app-bonds-default-react": "1.1.
|
|
62
|
+
"@molecule/app-bonds-default-react": "1.1.4",
|
|
63
63
|
"@molecule/app-i18n": "1.0.3",
|
|
64
64
|
"@testing-library/dom": "10.4.1",
|
|
65
65
|
"@testing-library/react": "16.3.2",
|