Skip to content

Graphorin API reference v0.1.0


Graphorin API reference / @graphorin/mcp / / createOAuthAuthorizationProvider

Function: createOAuthAuthorizationProvider()

ts
function createOAuthAuthorizationProvider(options): OAuthAuthorizationProvider;

Defined in: packages/mcp/src/oauth/bridge.ts:70

Build a provider that resolves the Authorization header value the Streamable HTTP / SSE MCP transports send on every request.

The provider:

  1. Loads the persisted session metadata from the supplied store.
  2. Refreshes the session when it is within refreshAheadMs of expiry.
  3. Wraps every refresh failure in MCPAuthError carrying a hint that points the operator to the upcoming graphorin auth refresh CLI.

Parameters

ParameterType
optionsOAuthAuthorizationProviderOptions

Returns

OAuthAuthorizationProvider

Stable