{"_id":"@atiproto/kv-oauth-state-store","name":"@atiproto/kv-oauth-state-store","dist-tags":{"latest":"0.0.1"},"versions":{"0.0.1":{"name":"@atiproto/kv-oauth-state-store","version":"0.0.1","description":"Cloudflare KV-backed state and session stores for @atproto/oauth-client","main":"dist/index.js","module":"dist/index.mjs","types":"dist/index.d.ts","exports":{".":{"source":"./src/index.ts","types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"}},"scripts":{"build":"tsup && tsc --emitDeclarationOnly --declaration","prepack":"npm run build","test":"vitest run"},"license":"MIT","dependencies":{"@atproto/jwk-jose":"^0.1.11"},"devDependencies":{"@atproto/jwk":"^0.2.0","@atproto/oauth-client":"^0.6.0","@cloudflare/workers-types":"^4.20260411.1","tsup":"^8.5.1","typescript":"^6.0.2","vitest":"^4.1.4"},"peerDependencies":{"@atproto/oauth-client":">=0.5.0"},"gitHead":"b41c46073aea7dacad7f55863567753449c80a31","_id":"@atiproto/kv-oauth-state-store@0.0.1","_nodeVersion":"24.14.0","_npmVersion":"11.9.0","dist":{"integrity":"sha512-KTL7eqfxTTJFddnhq1wCVwSynARIsxrRUxa31nJPQcVZsM82cGtgcXeeMzEyaQIr5NKMAjZNYzZm6JtySY6TiQ==","shasum":"7a169376c332fa7bf905c31255e380b2f7db05ee","tarball":"https://registry.npmjs.org/@atiproto/kv-oauth-state-store/-/kv-oauth-state-store-0.0.1.tgz","fileCount":12,"unpackedSize":22978,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIB1b4uK6laKcpGsmqTRPYIPRZ3+kTck09Ua9lsU7AjYeAiEA22rSOBzn7mUnUVjyrKncw47JGM2Xp5yNpVaii2/a8No="}]},"_npmUser":{"name":"kayakyakr","email":"kayakyakr@gmail.com"},"directories":{},"maintainers":[{"name":"kayakyakr","email":"kayakyakr@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/kv-oauth-state-store_0.0.1_1776025852261_0.5479872433130155"},"_hasShrinkwrap":false}},"time":{"created":"2026-04-12T20:30:52.103Z","0.0.1":"2026-04-12T20:30:52.403Z","modified":"2026-04-12T20:30:52.648Z"},"maintainers":[{"name":"kayakyakr","email":"kayakyakr@gmail.com"}],"description":"Cloudflare KV-backed state and session stores for @atproto/oauth-client","license":"MIT","readme":"# @atiproto/kv-oauth-state-store\n\nCloudflare KV-backed state and session stores for `@atproto/oauth-client`.\n\n[![npm](https://img.shields.io/npm/v/@atiproto/kv-oauth-state-store)](https://www.npmjs.com/package/@atiproto/kv-oauth-state-store)\n\n- [Documentation](https://atiproto.com/docs/edge-oauth)\n- [GitHub](https://github.com/Yakrware/atiproto)\n\n## Installation\n\n```bash\nnpm install @atiproto/kv-oauth-state-store @atproto/oauth-client\n```\n\n## Usage\n\n```typescript\nimport { KvStateStore, KvSessionStore } from \"@atiproto/kv-oauth-state-store\";\n\nconst stateStore = new KvStateStore(env.OAUTH_STATE_KV, {\n  prefix: \"oauth_state:\",  // default\n  ttlSeconds: 600,         // default: 10 minutes\n});\n\nconst sessionStore = new KvSessionStore(env.OAUTH_SESSION_KV, {\n  prefix: \"oauth_session:\", // default\n  ttlSeconds: 604800,       // default: 7 days\n});\n```\n\nAdd KV bindings in your `wrangler.jsonc`:\n\n```jsonc\n{\n  \"kv_namespaces\": [\n    { \"binding\": \"OAUTH_STATE_KV\", \"id\": \"<your-kv-id>\" },\n    { \"binding\": \"OAUTH_SESSION_KV\", \"id\": \"<your-kv-id>\" }\n  ]\n}\n```\n\n## License\n\nMIT\n","readmeFilename":"README.md","_rev":"1-268dc878d48dd8b1e7a0501b17fbd6f6"}