Skip to content

Commit f953799

Browse files
docs: clarify raw client API differences and state sync behaviour
1 parent 8cd90ef commit f953799

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

EXAMPLES.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,9 @@ export default function App() {
137137
}
138138
```
139139

140-
> **Note:** `getTokenSilently()` requires an active session. Ensure `Auth0Provider` has mounted and completed initialization before calling it outside React.
140+
> **Note:**
141+
> - The raw `Auth0Client` method is `getTokenSilently()`, not `getAccessTokenSilently()`. They share the same token cache but the hook version also updates React state.
142+
> - Calling methods on the raw client does not update React state. For token fetching this is fine since the cache is shared. Avoid calling `client.logout()` directly — use the `logout` method from `useAuth0` instead so React state stays in sync.
141143
142144
Use the same client instance in a TanStack Start client function middleware:
143145

0 commit comments

Comments
 (0)