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:
- Loads the persisted session metadata from the supplied store.
- Refreshes the session when it is within
refreshAheadMsof expiry. - Wraps every refresh failure in MCPAuthError carrying a
hintthat points the operator to the upcominggraphorin auth refreshCLI.
Parameters
| Parameter | Type |
|---|---|
options | OAuthAuthorizationProviderOptions |