{"_id":"@superfunctions/oauth-http","_rev":"2-84328d9f238a2952404232f98da15804","name":"@superfunctions/oauth-http","dist-tags":{"latest":"0.1.0"},"versions":{"0.0.1":{"name":"@superfunctions/oauth-http","version":"0.0.1","keywords":["oauth","http","superfunctions"],"author":{"name":"21n"},"license":"MIT","_id":"@superfunctions/oauth-http@0.0.1","maintainers":[{"name":"21native","email":"npm@21n.org"}],"homepage":"https://github.com/21nCo/super-functions#readme","bugs":{"url":"https://github.com/21nCo/super-functions/issues"},"dist":{"shasum":"d571c5b08bb4f894a0edde8dd7150a65aa90af40","tarball":"https://registry.npmjs.org/@superfunctions/oauth-http/-/oauth-http-0.0.1.tgz","fileCount":18,"integrity":"sha512-WHiDO7y20T+fducaCC40LbfUqoObQBeUnfdwGInSTf7w9TF0z0lc2FzqKeX7xEFM4z0E2OE4o+7h1jjZ7M8DYw==","signatures":[{"sig":"MEQCICiyRHkrxMVQumTTIdnBT+mpZbXvbhslHlz191rZteL3AiAF4SiMi8QVk5NdUNLanRH0ibE6LA5NSlsCF6S++iLi1w==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":49369},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},"gitHead":"c566cac4b41a7b4a55ff128aad6471f275f03e22","scripts":{"lint":"echo 'lint not configured'","test":"vitest --config ./vitest.config.ts --run","build":"tsc","clean":"rm -rf dist","typecheck":"tsc --noEmit","test:watch":"vitest --config ./vitest.config.ts --watch"},"_npmUser":{"name":"21native","email":"npm@21n.org"},"repository":{"url":"git+https://github.com/21nCo/super-functions.git","type":"git","directory":"packages/oauth-http"},"_npmVersion":"10.8.2","description":"OAuth HTTP transport contracts for Superfunctions","directories":{},"_nodeVersion":"20.20.2","dependencies":{"@superfunctions/oauth-core":"0.0.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^3.2.4","typescript":"^5.6.0","@types/node":"^22.0.0"},"_npmOperationalInternal":{"tmp":"tmp/oauth-http_0.0.1_1778751219202_0.5362117106302087","host":"s3://npm-registry-packages-npm-production"}},"0.1.0":{"name":"@superfunctions/oauth-http","version":"0.1.0","description":"OAuth HTTP transport contracts for Superfunctions","type":"module","main":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},"scripts":{"build":"tsc","test":"vitest --config ./vitest.config.ts --run","test:watch":"vitest --config ./vitest.config.ts --watch","lint":"echo 'lint not configured'","typecheck":"tsc --noEmit","clean":"rm -rf dist"},"keywords":["oauth","http","superfunctions"],"author":{"name":"21n"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/21nCo/super-functions.git","directory":"packages/oauth-http"},"publishConfig":{"access":"public"},"dependencies":{"@superfunctions/oauth-core":"0.1.0"},"devDependencies":{"@types/node":"^22.0.0","typescript":"^5.6.0","vitest":"^3.2.4"},"_id":"@superfunctions/oauth-http@0.1.0","gitHead":"e11bd81db6390dbc38303a5f3da6baadbaef0c8b","bugs":{"url":"https://github.com/21nCo/super-functions/issues"},"homepage":"https://github.com/21nCo/super-functions#readme","_nodeVersion":"20.20.2","_npmVersion":"10.8.2","dist":{"integrity":"sha512-MkSZqWlVQ/fboHvBBGLxW2ROY4OOksLiujriqZcDYvkzRtCXEg5t2EO4yGYrJo3hIbIkTg1xCY0VQnDsaY1fBw==","shasum":"831dccd7bcfe1c2c15e96bb4f32a319d5c81a5f6","tarball":"https://registry.npmjs.org/@superfunctions/oauth-http/-/oauth-http-0.1.0.tgz","fileCount":18,"unpackedSize":64144,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIDQcKhlkegzx+M00kbz/K12xFVyCki5RZW2Tal9OhDHMAiBl5n5coenRZK+XqxR1yw63mRtV2Y69pTGNcWuOuz69mQ=="}]},"_npmUser":{"name":"21native","email":"npm@21n.org"},"directories":{},"maintainers":[{"name":"21native","email":"npm@21n.org"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/oauth-http_0.1.0_1787981842164_0.7051969163000762"},"_hasShrinkwrap":false}},"time":{"created":"2026-05-14T09:33:39.093Z","modified":"2026-08-29T05:37:22.469Z","0.0.1":"2026-05-14T09:33:39.348Z","0.1.0":"2026-08-29T05:37:22.297Z"},"bugs":{"url":"https://github.com/21nCo/super-functions/issues"},"author":{"name":"21n"},"license":"MIT","homepage":"https://github.com/21nCo/super-functions#readme","keywords":["oauth","http","superfunctions"],"repository":{"type":"git","url":"git+https://github.com/21nCo/super-functions.git","directory":"packages/oauth-http"},"description":"OAuth HTTP transport contracts for Superfunctions","maintainers":[{"name":"21native","email":"npm@21n.org"}],"readme":"# @superfunctions/oauth-http\n\nReusable OAuth token transport for code exchange, refresh, revocation, retries, and normalized upstream errors.\n\n## Install\n\n```bash\nnpm install @superfunctions/oauth-http @superfunctions/oauth-core @superfunctions/oauth-providers\n```\n\n## Quick Start\n\n```ts\nimport { DefaultOAuthTokenHttpClient } from \"@superfunctions/oauth-http\";\nimport { getOAuthProviderDescriptor } from \"@superfunctions/oauth-providers\";\n\nconst client = new DefaultOAuthTokenHttpClient();\nconst github = getOAuthProviderDescriptor(\"github\");\n\nconst tokenSet = await client.exchangeToken({\n  provider: github,\n  grantType: \"authorization_code\",\n  clientId: process.env.GITHUB_CLIENT_ID!,\n  clientSecret: process.env.GITHUB_CLIENT_SECRET!,\n  code: \"oauth-code\",\n  redirectUri: \"https://app.example/oauth/github/callback\",\n});\n```\n\n## Package Boundary\n\n`@superfunctions/oauth-http` owns OAuth HTTP transport only:\n\n- token endpoint exchange\n- refresh exchange\n- revocation requests\n- retry policy and normalized transport errors\n\nIt does not own state validation, token persistence, or route generation. Pair it with:\n\n- `@superfunctions/oauth-core` for callback invariants\n- `@superfunctions/oauth-flow` for full lifecycle orchestration\n- `@superfunctions/oauth-router` for route exposure\n\n## Production Notes\n\n- Provide secrets through `clientSecretResolver` when your platform resolves secrets dynamically.\n- Tune retries for provider-specific 429/5xx behavior instead of wrapping token calls with ad hoc fetch logic.\n- Treat provider revocation as best effort unless your product contract requires remote confirmation before local cleanup.\n\n## Related Packages\n\n- OAuth core primitives: [../oauth-core/README.md](../oauth-core/README.md)\n- Provider descriptors: [../oauth-providers/README.md](../oauth-providers/README.md)\n- Route factories: [../oauth-router/README.md](../oauth-router/README.md)\n","readmeFilename":"README.md"}