Skip to main content

Function: createAuthenticatedClient()

createAuthenticatedClient(agent): AtpBaseClient

Defined in: web/lib/api/client.ts:532

Create an authenticated API client using a specific agent for service auth.

For paper-centric eprints, the service auth JWT must be issued by the paper's PDS, not the user's PDS. This factory creates a client that uses the provided agent for all service auth token requests.

Parameters​

agent​

Agent

the ATProto agent whose PDS will issue service auth JWTs

Returns​

AtpBaseClient

a typed API client authenticated with the given agent