{"_id":"@aymenkits/auth-express","name":"@aymenkits/auth-express","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@aymenkits/auth-express","version":"1.0.0","description":"Express 4/5-compatible adapter for @aymenkits/auth-core — requireAuth/optionalAuth middleware, claim guards, standard endpoint handlers and error mapping. Envelope-agnostic, structural req/res typing.","license":"MIT","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"build":"tsc -p tsconfig.json","typecheck":"tsc -p tsconfig.json --noEmit"},"dependencies":{"@aymenkits/auth-core":"1.0.0","@aymenkits/auth-otp":"1.0.0"},"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/aymenmokhtarikouki/auth-kit.git","directory":"packages/express"},"keywords":["auth","otp","jwt","authentication","passwordless","oauth","express"],"engines":{"node":">=18"},"sideEffects":false,"homepage":"https://github.com/aymenmokhtarikouki/auth-kit#readme","bugs":{"url":"https://github.com/aymenmokhtarikouki/auth-kit/issues"},"author":{"name":"Aymen Mokhtari"},"_id":"@aymenkits/auth-express@1.0.0","gitHead":"b2260f281f2deb9854f2b19d781d4c0cc901492a","_nodeVersion":"22.14.0","_npmVersion":"10.9.2","dist":{"integrity":"sha512-JtOlXrKTU9cr82vORucLKs5WwCp6/V7qGukNmGYqt3ZL1c7/mxzyMTSJuwvusybQ/TZaZ+FTFrb45xq+B/d3QA==","shasum":"d358141d25a12bc118c087aa0ebba53a2dc98051","tarball":"https://registry.npmjs.org/@aymenkits/auth-express/-/auth-express-1.0.0.tgz","fileCount":7,"unpackedSize":18397,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCN66MJsHJbfYqh/VOIJXBWN1jBIIZnvN6OhOBpSbtP8gIhAOM9lLhxq/RB1o3lsNAlyXOKTFoO1zytF5jqhkzlhrkl"}]},"_npmUser":{"name":"aymen-mokhtari","email":"ayman.mokhtari@proton.me"},"directories":{},"maintainers":[{"name":"aymen-mokhtari","email":"ayman.mokhtari@proton.me"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/auth-express_1.0.0_1783791511795_0.0023650810542628076"},"_hasShrinkwrap":false}},"time":{"created":"2026-07-11T17:38:31.616Z","1.0.0":"2026-07-11T17:38:31.934Z","modified":"2026-07-11T17:38:32.181Z"},"maintainers":[{"name":"aymen-mokhtari","email":"ayman.mokhtari@proton.me"}],"description":"Express 4/5-compatible adapter for @aymenkits/auth-core — requireAuth/optionalAuth middleware, claim guards, standard endpoint handlers and error mapping. Envelope-agnostic, structural req/res typing.","homepage":"https://github.com/aymenmokhtarikouki/auth-kit#readme","keywords":["auth","otp","jwt","authentication","passwordless","oauth","express"],"repository":{"type":"git","url":"git+https://github.com/aymenmokhtarikouki/auth-kit.git","directory":"packages/express"},"author":{"name":"Aymen Mokhtari"},"bugs":{"url":"https://github.com/aymenmokhtarikouki/auth-kit/issues"},"license":"MIT","readme":"# @aymenkits/auth-express\n\nExpress 4/5 middleware (requireAuth / optionalAuth / requireRole) and route factories for the standard auth endpoints. Envelope-agnostic, structural typing — no express dependency.\n\n## Install\n\n```bash\nnpm install @aymenkits/auth-express\n```\n\nInstalls with it: `@aymenkits/auth-core`, `@aymenkits/auth-otp` (automatic dependencies).\n\n## You provide\n\n- Your Express app/router\n- The flows/token service from `@aymenkits/auth-core`\n- Optionally your rate limiter (seam)\n\nThe package never owns tables, never imports an ORM, HTTP framework, or\nprovider SDK it can take as a parameter — storage and delivery are seams your\napp implements on its own stack.\n\n## Quick example\n\n```ts\nimport { createAuthMiddleware } from '@aymenkits/auth-express'\n\nconst { requireAuth } = createAuthMiddleware({ tokens })\nrouter.get('/users/me', requireAuth, meHandler)\n```\n\n## Pairs with\n\n- Downstream kit handlers (@aymenkits/review-express, chat-express, notify-express) read the `req.auth.userId` this middleware sets\n\nKits pair **by shape, never by import** — pass the sibling kit, your own\nservice, or a stub in tests.\n\n## Docs\n\nFull contracts and integration guides live in the repo:\nhttps://github.com/aymenmokhtarikouki/auth-kit (`contracts/`, `docs/`).\n\n## License\n\nMIT\n","readmeFilename":"README.md","_rev":"1-55f6a980ea71a5e4ca9b2ec447526db9"}