Browser sessions (Dynamic)
The web app uses Dynamic (@dynamic-labs/sdk-react-core) for authentication. Client utilities import getAuthToken from @/lib/dynamic, which re-exports Dynamic SDK helpers.
Calling first-party /api routes
Authenticated fetches use the X-Authorization header (note: not Authorization):
fetchJSONWithAuth in lib/client/fetcher.ts sets:
Server-to-backend calls
lib/server/fetcher.ts copies the user token into outbound requests to NEXT_PUBLIC_API_BASE_URL using the same header name pattern for backend routes that expect the Dynamic JWT.