{"_id":"@bskyprism/atproto-oauth-client-cloudflare-workers","_rev":"3-00e8e77841862c0de1f1694bc46c47d0","name":"@bskyprism/atproto-oauth-client-cloudflare-workers","dist-tags":{"latest":"0.2.4"},"versions":{"0.2.2":{"name":"@bskyprism/atproto-oauth-client-cloudflare-workers","version":"0.2.2","keywords":["atproto"],"author":{"name":"Joel Gustafson"},"license":"MIT","_id":"@bskyprism/atproto-oauth-client-cloudflare-workers@0.2.2","maintainers":[{"name":"nichoth","email":"nichoth@gmail.com"}],"homepage":"https://github.com/nDimensional/atproto-oauth-client-cloudflare-workers#readme","bugs":{"url":"https://github.com/nDimensional/atproto-oauth-client-cloudflare-workers/issues"},"dist":{"shasum":"85a20af80baa4417430b0887695e0536d0fc9675","tarball":"https://registry.npmjs.org/@bskyprism/atproto-oauth-client-cloudflare-workers/-/atproto-oauth-client-cloudflare-workers-0.2.2.tgz","fileCount":131,"integrity":"sha512-rFhSThOCfygszW3XA9/s3IJOulb1TpWduO53J39zEWQu4ZYtSTTDVtiuagr1rg7lCsC8gjFOD/Xn6+3vGMpxHQ==","signatures":[{"sig":"MEYCIQCEWxuvmlGTXNZ7Zihhk0fWv3QIJVzygKBi+/1FXMrEeQIhAOPc5P7Ljx0ZuLfpao72o072c29j5IG4jbCRhV3mtQmK","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":264436},"main":"lib/index.js","type":"module","types":"./lib/index.d.ts","exports":{".":"./lib/index.js","./did-resolver":"./lib/did-resolver/index.js","./oauth-client":"./lib/oauth-client/index.js","./handle-resolver":"./lib/handle-resolver/index.js","./identity-resolver":"./lib/identity-resolver/index.js"},"gitHead":"229721d494d3bd43da5417f7943f0d6a1155de76","imports":{"#did-resolver":"./lib/did-resolver/index.js","#oauth-client":"./lib/oauth-client/index.js","#handle-resolver":"./lib/handle-resolver/index.js","#identity-resolver":"./lib/identity-resolver/index.js"},"scripts":{"dev":"tsc --build tsconfig.json --watch","build":"tsc --build tsconfig.json","clean":"tsc --build tsconfig.json --clean","prepublishOnly":"npm run build"},"_npmUser":{"name":"nichoth","email":"nichoth@gmail.com"},"repository":{"url":"git+https://github.com/nDimensional/atproto-oauth-client-cloudflare-workers.git","type":"git"},"_npmVersion":"11.6.1","description":"This library contains local patched copies of","directories":{},"_nodeVersion":"22.18.0","dependencies":{"zod":"^3.25.76","@atproto/did":"^0.2.0","multiformats":"^13.4.1","@atproto/jwk-jose":"^0.1.10","@atproto-labs/pipe":"^0.1.1","@atproto-labs/fetch":"^0.2.3","@atproto/oauth-types":"^0.4.1","@atproto-labs/simple-store":"^0.3.0","@atproto-labs/simple-store-memory":"^0.1.4"},"_hasShrinkwrap":false,"devDependencies":{"prettier":"^3.6.2","typescript":"^5.9.2","@types/node":"^24.5.2"},"_npmOperationalInternal":{"tmp":"tmp/atproto-oauth-client-cloudflare-workers_0.2.2_1766355273722_0.4203400010070242","host":"s3://npm-registry-packages-npm-production"}},"0.2.3":{"name":"@bskyprism/atproto-oauth-client-cloudflare-workers","version":"0.2.3","keywords":["atproto"],"author":{"name":"Joel Gustafson"},"license":"MIT","_id":"@bskyprism/atproto-oauth-client-cloudflare-workers@0.2.3","maintainers":[{"name":"nichoth","email":"nichoth@gmail.com"}],"homepage":"https://github.com/bskyprism/atproto-oauth-client-cloudflare-workers","bugs":{"url":"https://github.com/bskyprism/atproto-oauth-client-cloudflare-workers/issues"},"dist":{"shasum":"af3ce3e832e05d199d4dcc2d29aa333b8e7bb348","tarball":"https://registry.npmjs.org/@bskyprism/atproto-oauth-client-cloudflare-workers/-/atproto-oauth-client-cloudflare-workers-0.2.3.tgz","fileCount":131,"integrity":"sha512-GHzTVHE5ZkvoV8wN5F/jz+JQjxrfiKdYTQg2jC4TTfeyhHb7ECJeH7jiaFzpjW1pLSJNUFgeG4YWeWVZOKUBAA==","signatures":[{"sig":"MEYCIQDPWgLJgvOB9hKt7mr8Z44jfkk4c5ARE/jqeHhVpwTisgIhAO7Rm9kkjfImEL2o3M2Q7G7WP+ZEgbhRAUR5N7C5PoBD","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":264480},"main":"lib/index.js","type":"module","types":"./lib/index.d.ts","exports":{".":"./lib/index.js","./did-resolver":"./lib/did-resolver/index.js","./oauth-client":"./lib/oauth-client/index.js","./handle-resolver":"./lib/handle-resolver/index.js","./identity-resolver":"./lib/identity-resolver/index.js"},"gitHead":"63bc375d946ac6edcc5fc7195366f6476ba2d9a5","imports":{"#did-resolver":"./lib/did-resolver/index.js","#oauth-client":"./lib/oauth-client/index.js","#handle-resolver":"./lib/handle-resolver/index.js","#identity-resolver":"./lib/identity-resolver/index.js"},"scripts":{"dev":"tsc --build tsconfig.json --watch","build":"tsc --build tsconfig.json","clean":"tsc --build tsconfig.json --clean","postversion":"git push --follow-tags && npm publish","prepublishOnly":"npm run build"},"_npmUser":{"name":"nichoth","email":"nichoth@gmail.com"},"repository":{"url":"git+https://github.com/bskyprism/atproto-oauth-client-cloudflare-workers.git","type":"git"},"_npmVersion":"11.6.1","description":"This library contains local patched copies of","directories":{},"_nodeVersion":"22.18.0","dependencies":{"zod":"^3.25.76","@atproto/did":"^0.2.0","multiformats":"^13.4.1","@atproto/jwk-jose":"^0.1.10","@atproto-labs/pipe":"^0.1.1","@atproto-labs/fetch":"^0.2.3","@atproto/oauth-types":"^0.4.1","@atproto-labs/simple-store":"^0.3.0","@atproto-labs/simple-store-memory":"^0.1.4"},"_hasShrinkwrap":false,"devDependencies":{"prettier":"^3.6.2","typescript":"^5.9.2","@types/node":"^24.5.2"},"_npmOperationalInternal":{"tmp":"tmp/atproto-oauth-client-cloudflare-workers_0.2.3_1766355700087_0.47980818224476063","host":"s3://npm-registry-packages-npm-production"}},"0.2.4":{"name":"@bskyprism/atproto-oauth-client-cloudflare-workers","version":"0.2.4","type":"module","main":"lib/index.js","types":"./lib/index.d.ts","exports":{".":"./lib/index.js","./did-resolver":"./lib/did-resolver/index.js","./handle-resolver":"./lib/handle-resolver/index.js","./identity-resolver":"./lib/identity-resolver/index.js","./oauth-client":"./lib/oauth-client/index.js"},"scripts":{"dev":"tsc --build tsconfig.json --watch","build":"tsc --build tsconfig.json","clean":"tsc --build tsconfig.json --clean","prepublishOnly":"npm run build","postversion":"git push --follow-tags && npm publish"},"devDependencies":{"@types/node":"^24.5.2","prettier":"^3.6.2","typescript":"^5.9.2"},"dependencies":{"@atproto-labs/fetch":"^0.2.3","@atproto-labs/pipe":"^0.1.1","@atproto-labs/simple-store":"^0.3.0","@atproto-labs/simple-store-memory":"^0.1.4","@atproto/did":"^0.2.0","@atproto/jwk-jose":"^0.1.10","@atproto/oauth-types":"^0.4.1","multiformats":"^13.4.1","zod":"^3.25.76"},"imports":{"#did-resolver":"./lib/did-resolver/index.js","#handle-resolver":"./lib/handle-resolver/index.js","#identity-resolver":"./lib/identity-resolver/index.js","#oauth-client":"./lib/oauth-client/index.js"},"repository":{"type":"git","url":"git+https://github.com/bskyprism/atproto-oauth-client-cloudflare-workers.git"},"keywords":["atproto"],"author":{"name":"Joel Gustafson"},"license":"MIT","bugs":{"url":"https://github.com/bskyprism/atproto-oauth-client-cloudflare-workers/issues"},"homepage":"https://github.com/bskyprism/atproto-oauth-client-cloudflare-workers","gitHead":"5ae42eee002dfe3a9a0a13aef60ee8daaf43ffea","_id":"@bskyprism/atproto-oauth-client-cloudflare-workers@0.2.4","description":"This library contains local patched copies of","_nodeVersion":"22.18.0","_npmVersion":"11.6.1","dist":{"integrity":"sha512-NDHOyMfc/SwFQ1ehh5rsFn9aR2pFM8Iezxhy1/Hxn5M3a0v5pBZjoCo1eQ6O4FozAQGrZ+RXllyiZ7g74J3H2Q==","shasum":"da744a4a2443d8c7e6d8794beb1d9df33efbeb59","tarball":"https://registry.npmjs.org/@bskyprism/atproto-oauth-client-cloudflare-workers/-/atproto-oauth-client-cloudflare-workers-0.2.4.tgz","fileCount":131,"unpackedSize":264486,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDlpuayocspUI5XqwOszgNlOrh9juyRu6wTW4/gobuWtAIgE4EtGamxaD3kHtLjOvSn/cOi50wZaey1luF7BJFB7VI="}]},"_npmUser":{"name":"nichoth","email":"nichoth@gmail.com"},"directories":{},"maintainers":[{"name":"nichoth","email":"nichoth@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/atproto-oauth-client-cloudflare-workers_0.2.4_1766359599287_0.3400002309056742"},"_hasShrinkwrap":false}},"time":{"created":"2025-12-21T22:14:33.575Z","modified":"2025-12-21T23:26:39.728Z","0.2.2":"2025-12-21T22:14:33.886Z","0.2.3":"2025-12-21T22:21:40.230Z","0.2.4":"2025-12-21T23:26:39.499Z"},"bugs":{"url":"https://github.com/bskyprism/atproto-oauth-client-cloudflare-workers/issues"},"author":{"name":"Joel Gustafson"},"license":"MIT","homepage":"https://github.com/bskyprism/atproto-oauth-client-cloudflare-workers","keywords":["atproto"],"repository":{"type":"git","url":"git+https://github.com/bskyprism/atproto-oauth-client-cloudflare-workers.git"},"description":"This library contains local patched copies of","maintainers":[{"name":"nichoth","email":"nichoth@gmail.com"}],"readme":"# atproto-oauth-client-cloudflare-workers\n\nThis library contains local patched copies of\n\n- [`@atproto/oauth-client-node`](https://github.com/bluesky-social/atproto/tree/main/packages/oauth/oauth-client-node)\n- [`@atproto/oauth-client`](https://github.com/bluesky-social/atproto/tree/main/packages/oauth/oauth-client)\n- [`@atproto-labs/handle-resolver-node`](https://github.com/bluesky-social/atproto/tree/main/packages/internal/handle-resolver-node)\n- [`@atproto-labs/handle-resolver`](https://github.com/bluesky-social/atproto/tree/main/packages/internal/handle-resolver)\n- [`@atproto-labs/identity-resolver`](https://github.com/bluesky-social/atproto/tree/main/packages/internal/identity-resolver)\n- [`@atproto-labs/did-resolver`](https://github.com/bluesky-social/atproto/tree/main/packages/internal/did-resolver)\n\nthat are compatible with the Cloudflare Workers edge runtime.\n\nThe only changes applied throughout are:\n\n1. replacing `request.cache: \"no-cache\"` with `request.headers[\"cache-control\"]: \"no-cache\"`\n2. replacing `request.redirect: \"error\"` with `request.redirect: \"follow\"`\n\nDNS handle resolution requires the [`nodejs_compat` compatibility flag](https://developers.cloudflare.com/workers/runtime-apis/nodejs/).\n\n## Fork\n\nThis is a fork of [nDimensional/atproto-oauth-client-cloudflare-workers](https://github.com/nDimensional/atproto-oauth-client-cloudflare-workers).\n\n## Usage\n\n`WorkersOAuthClient` works mostly as a drop-in replacement for `NodeOAuthClient`.\n\n```ts\nimport { WorkersOAuthClient } from \"atproto-oauth-client-cloudflare-workers\"\n\nexport const client = new WorkersOAuthClient({\n\tclientMetadata: {\n\t  // ...\n\t}\n}\n```\n\nBy default, like `NodeOAuthClient`, this will use an in-memory store for the handle cache and DID cache. This doesn't make much sense for the workers environment, since memory is reset after each invocation. To use Cloudflare KV namespaces for your handle and DID caches, create `DidCacheKV` and `HandleCacheKV` instances and pass them to the `WorkersOAuthClient` constructor.\n\nSimilarly, to use KV namespaces for the oauth state store and oauth session store, (which are required), import and provide `StateStoreKV` and `SessionStoreKV` instances.\n\n```ts\nimport { env } from \"cloudflare:workers\"\n\nimport {\n\tWorkersOAuthClient,\n\tDidCacheKV,\n\tHandleCacheKV,\n\tStateStoreKV,\n\tSessionStoreKV,\n} from \"atproto-oauth-client-cloudflare-workers\";\n\nexport const client = new WorkersOAuthClient({\n  // did -> didDocument cache\n\tdidCache: new DidCacheKV(env.DID_CACHE),\n\t// handle -> did cache\n\thandleCache: new HandleCacheKV(env.HANDLE_CACHE),\n\n\tclientMetadata: {\n\t  // Interface to store authorization state data (during authorization flows)\n\t\tstateStore: new StateStoreKV(env.OAUTH_STATE_STORE),\n\t\t// Interface to store authenticated session data\n\t  sessionStore: new SessionStoreKV(env.OAUTH_SESSION_STORE),\n\n\t\t// ...\n\t}\n}\n```\n","readmeFilename":"README.md"}