This repository was archived by the owner on Oct 26, 2026. It is now read-only.
Repository navigation
Commit 67cccb0
committed
docs(skills): guard both useAuth members in the auth-permissions example
The `useAuth` fence under "useAuth hook" read `user.name` behind an
`isAuthenticated`-only guard. `AuthProvider` hardcodes `isAuthenticated`
to `true` in guest mode and in preview mode while `user` stays `null`,
so the example threw a TypeError in exactly the two modes a reader
without an auth backend is in. Guard both members the way the shipped
`UserMenu` does, and add one sentence beside the fence saying why a
signed-in-looking context can still carry no user.
The fence stays unmarked: it is a fragment by construction (three
undeclared placeholders), and marking it would red the gate for reasons
that are not this defect.
Claude-Session: https://claude.ai/code/session_01DAcomhvR9kKizeYgg89Vo8
Co-authored-by: Claude <noreply@anthropic.com>1 parent 69aa9c0 commit 67cccb0
2 files changed
Lines changed: 10 additions & 1 deletion
File tree
- .changeset
- skills/objectui/guides
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| 38 | + | |
| 39 | + | |
38 | 40 | | |
39 | 41 | | |
40 | 42 | | |
41 | 43 | | |
42 | 44 | | |
43 | 45 | | |
44 | 46 | | |
45 | | - | |
| 47 | + | |
46 | 48 | | |
47 | 49 | | |
48 | 50 | | |
| |||
0 commit comments