@adcp/sdk API Reference - v17.0.0-rc.0
    Preparing search index...

    Function createFileOAuthStorage

    • Create a file-backed OAuthConfigStorage.

      Reads are cheap: a single JSON.parse per call. Writes are atomic via write-then-rename so a crash mid-save cannot produce a half-written file.

      Does NOT touch fields outside the OAuth envelope (auth_token, custom fields) when saving — the MCP provider only mutates oauth_tokens, oauth_client, oauth_resource, oauth_code_verifier, and oauth_discovery_state. An own property explicitly set to undefined clears tokens, client, verifier or discovery state. Omitted properties preserve stored values for partial callers. Other fields keep their existing merge semantics.

      Parameters

      Returns OAuthConfigStorage

      const storage = createFileOAuthStorage({ configPath: '/home/user/.adcp/config.json' });
      const provider = createNonInteractiveOAuthProvider(agent, { storage });