{"_id":"supertokens-nestjs","_rev":"9-511216a1c922a5ed5004f22d53342c55","name":"supertokens-nestjs","dist-tags":{"latest":"1.0.1"},"versions":{"0.0.1":{"name":"supertokens-nestjs","version":"0.0.1","author":"","license":"ISC","_id":"supertokens-nestjs@0.0.1","maintainers":[{"name":"mihalyst","email":"mihaly@supertokens.com"}],"dist":{"shasum":"042e378a1aae5c9c3172805c89e998c02ab67a70","tarball":"https://registry.npmjs.org/supertokens-nestjs/-/supertokens-nestjs-0.0.1.tgz","fileCount":104,"integrity":"sha512-WodMbzC2Y0tkw/KmS9ukagf7APKNL+5zGrhpVWSUMP2D8lyhMgOY3Smst9OhrS+6Jys3goNHMJ56t163WlO/rw==","signatures":[{"sig":"MEUCIQCr1X5gIlc+M0U6HFW6bZgHYy4Ev6+2hsr31t91KPI9/AIgZXzVKf+5nYYvsN1gd3i5yFg0n9zwSgsEXcAUS+y2G3s=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":2041658},"main":"index.ts","gitHead":"99e63d8de6eaac0b0d99ac6169431a52e0d055b2","scripts":{"test":"vitest run","build":"rimraf dist && tsc -p tsconfig.json","test:watch":"vitest","start:express":"(cd ./examples/react-frontend && npm run start) & (cd ./examples/express-backend && npm run start) & wait","start:fastify":"(cd ./examples/react-frontend && npm run start) & (cd ./examples/fastify-backend && npm run start) & wait","start:graphql":"(cd ./examples/react-frontend && npm run start) & (cd ./examples/graphql-backend && npm run start) & wait"},"_npmUser":{"name":"mihalyst","email":"mihaly@supertokens.com"},"_npmVersion":"10.8.2","description":"![SuperTokens banner](https://raw.githubusercontent.com/supertokens/supertokens-logo/master/images/Artboard%20%E2%80%93%2027%402x.png)","directories":{},"_nodeVersion":"20.18.2","dependencies":{"express":"^4.21.2"},"_hasShrinkwrap":false,"devDependencies":{"rimraf":"^6.0.1","vitest":"^3.0.4","supertest":"^7.0.0","typescript":"^5.7.3","npm-run-all":"^4.1.5","@nestjs/testing":"^11.0.7","@nestjs/platform-express":"^11.0.7"},"peerDependencies":{"@nestjs/core":"^11.0.1","supertokens-node":"^21.1.0","@nestjs/platform-express":"^11.0.1","@nestjs/platform-fastify":"^11.0.6"},"peerDependenciesMeta":{"@nestjs/platform-express":{"optional":true},"@nestjs/platform-fastify":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/supertokens-nestjs_0.0.1_1741130492606_0.8139621404613728","host":"s3://npm-registry-packages-npm-production"}},"0.0.2":{"name":"supertokens-nestjs","version":"0.0.2","keywords":["supertokens","nestjs","nodejs","authentication","session-management"],"license":"Apache-2.0","_id":"supertokens-nestjs@0.0.2","maintainers":[{"name":"advaitruia","email":"advaitruia@gmail.com"},{"name":"mihalyst","email":"mihaly@supertokens.com"}],"homepage":"https://github.com/supertokens/supertokens-nestjs#readme","bugs":{"url":"https://github.com/supertokens/supertokens-nestjs/issues"},"dist":{"shasum":"2130b331c14f216cac72c5d27cd3acd4562a58c2","tarball":"https://registry.npmjs.org/supertokens-nestjs/-/supertokens-nestjs-0.0.2.tgz","fileCount":136,"integrity":"sha512-8F2HJY3SF9bbewDu85JiSPDsto0eLDP79pO5QK0ubCwql9Kp4g+vecId178oLAjjbiIFKG1akl8zs0P5qgejxg==","signatures":[{"sig":"MEUCIQCdcdgU+uCyLulCDOtXMnN5pYTEqIqT0XVE/OK55+OH6AIgAX8jb7DDq74SuewzCtASP+HLQJAXeLIEaYkXA7P37p4=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":2090247},"main":"dist/index.js","types":"dist/index.d.ts","exports":{".":{"types":"./index.d.ts","default":"./index.js"},"./index":{"types":"./index.d.ts","default":"./index.js"},"./index.js":{"types":"./index.d.ts","default":"./index.js"}},"gitHead":"cd029cb1c33ca59b59d1ef83c2fed859b4ec534a","scripts":{"test":"vitest run","build":"rimraf dist && tsc -p tsconfig.json","test:watch":"vitest","start:express":"(cd ./examples/react-frontend && npm run start) & (cd ./examples/express-backend && npm run start) & wait","start:fastify":"(cd ./examples/react-frontend && npm run start) & (cd ./examples/fastify-backend && npm run start) & wait","start:graphql":"(cd ./examples/react-frontend && npm run start) & (cd ./examples/graphql-backend && npm run start) & wait"},"_npmUser":{"name":"mihalyst","email":"mihaly@supertokens.com"},"repository":{"url":"git+https://github.com/supertokens/supertokens-nestjs.git","type":"git"},"_npmVersion":"10.8.2","description":"SuperTokens integration for NestJS applications","directories":{},"_nodeVersion":"20.18.2","_hasShrinkwrap":false,"devDependencies":{"rimraf":"^6.0.1","vitest":"^3.0.4","supertest":"^7.0.0","typescript":"^5.7.3","npm-run-all":"^4.1.5","@nestjs/testing":"^11.0.7","@nestjs/platform-express":"^11.0.7"},"peerDependencies":{"express":"^4.21.2","@nestjs/core":"^11.0.1","supertokens-node":"^21.1.0","@nestjs/platform-express":"^11.0.1","@nestjs/platform-fastify":"^11.0.6"},"peerDependenciesMeta":{"@nestjs/platform-express":{"optional":true},"@nestjs/platform-fastify":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/supertokens-nestjs_0.0.2_1741253986858_0.7866727198335348","host":"s3://npm-registry-packages-npm-production"}},"0.0.3":{"name":"supertokens-nestjs","version":"0.0.3","keywords":["supertokens","nestjs","nodejs","authentication","session-management"],"license":"Apache-2.0","_id":"supertokens-nestjs@0.0.3","maintainers":[{"name":"advaitruia","email":"advaitruia@gmail.com"},{"name":"mihalyst","email":"mihaly@supertokens.com"}],"homepage":"https://github.com/supertokens/supertokens-nestjs#readme","bugs":{"url":"https://github.com/supertokens/supertokens-nestjs/issues"},"dist":{"shasum":"30b860b6543ef19db2aa6ed84ae375f0d1e4f875","tarball":"https://registry.npmjs.org/supertokens-nestjs/-/supertokens-nestjs-0.0.3.tgz","fileCount":138,"integrity":"sha512-TJrDlk/mtm6lr0hTQB9+wOgz3MZ3T2i2ZE18v0Ad2UIJl9psNuOG35UClp/NJDnxYJDAZf2uJN4B4f0yuZn6qg==","signatures":[{"sig":"MEQCIDa0P5yDIiJAQdZXSi2wMreFmxhuaz9do56DWs6uUyLiAiBo+Tl+g7q4sGFwjH/lO8fxwWwbk9jW4vKdkMCdNys23A==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":2159827},"main":"dist/index.js","types":"dist/index.d.ts","exports":{".":{"types":"./index.d.ts","default":"./index.js"},"./index":{"types":"./index.d.ts","default":"./index.js"},"./index.js":{"types":"./index.d.ts","default":"./index.js"}},"gitHead":"dc093167810b92fd398a4176317dc4cc384f7ef1","scripts":{"test":"vitest run","build":"rimraf dist && tsc -p tsconfig.json","test:watch":"vitest","start:express":"(cd ./examples/react-frontend && npm run start) & (cd ./examples/express-backend && npm run start) & wait","start:fastify":"(cd ./examples/react-frontend && npm run start) & (cd ./examples/fastify-backend && npm run start) & wait","start:graphql":"(cd ./examples/react-frontend && npm run start) & (cd ./examples/graphql-backend && npm run start) & wait"},"_npmUser":{"name":"mihalyst","email":"mihaly@supertokens.com"},"repository":{"url":"git+https://github.com/supertokens/supertokens-nestjs.git","type":"git"},"_npmVersion":"10.8.2","description":"SuperTokens integration for NestJS applications","directories":{},"_nodeVersion":"20.18.2","_hasShrinkwrap":false,"devDependencies":{"rimraf":"^6.0.1","vitest":"^3.0.4","supertest":"^7.0.0","typescript":"^5.7.3","npm-run-all":"^4.1.5","@nestjs/apollo":"^13.0.4","@nestjs/graphql":"^13.0.4","@nestjs/testing":"^11.0.7","@types/supertest":"^6.0.3","@nestjs/platform-express":"^11.0.7"},"peerDependencies":{"@nestjs/core":"^11.0.1","supertokens-node":"^21.1.0","@nestjs/platform-express":"^11.0.1","@nestjs/platform-fastify":"^11.0.6"},"peerDependenciesMeta":{"@nestjs/platform-express":{"optional":true},"@nestjs/platform-fastify":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/supertokens-nestjs_0.0.3_1746768409753_0.6386257304991951","host":"s3://npm-registry-packages-npm-production"}},"0.0.4":{"name":"supertokens-nestjs","version":"0.0.4","keywords":["supertokens","nestjs","nodejs","authentication","session-management"],"license":"Apache-2.0","_id":"supertokens-nestjs@0.0.4","maintainers":[{"name":"advaitruia","email":"advaitruia@gmail.com"},{"name":"mihalyst","email":"mihaly@supertokens.com"}],"homepage":"https://github.com/supertokens/supertokens-nestjs#readme","bugs":{"url":"https://github.com/supertokens/supertokens-nestjs/issues"},"dist":{"shasum":"705df16773d546b2e4f31899a451962d71804d8f","tarball":"https://registry.npmjs.org/supertokens-nestjs/-/supertokens-nestjs-0.0.4.tgz","fileCount":138,"integrity":"sha512-WFAfr+Oha+Y+FySLlhPPszH1WyCm0aOoEUvPqtCd93f9q9XXCeMUn1LUi6PvERl+A5P9Poo4lBGJO33tDYniuQ==","signatures":[{"sig":"MEYCIQD68jQ9CAugb1VkG9M8uPKij7IzqiDTcZoVqxiKc7vflgIhAIVeUGc0XTVVdyBKkS0HZC1ZkFRwPySLWUxxtBfV7yQc","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":2160073},"main":"dist/index.js","types":"dist/index.d.ts","exports":{".":{"types":"./index.d.ts","default":"./index.js"},"./index":{"types":"./index.d.ts","default":"./index.js"},"./index.js":{"types":"./index.d.ts","default":"./index.js"}},"gitHead":"0f9e4f288d703b7a4a9d9c06db14c4e791f42aa9","scripts":{"test":"vitest run","build":"rimraf dist && tsc -p tsconfig.json","test:watch":"vitest","start:express":"(cd ./examples/react-frontend && npm run start) & (cd ./examples/express-backend && npm run start) & wait","start:fastify":"(cd ./examples/react-frontend && npm run start) & (cd ./examples/fastify-backend && npm run start) & wait","start:graphql":"(cd ./examples/react-frontend && npm run start) & (cd ./examples/graphql-backend && npm run start) & wait"},"_npmUser":{"name":"mihalyst","email":"mihaly@supertokens.com"},"repository":{"url":"git+https://github.com/supertokens/supertokens-nestjs.git","type":"git"},"_npmVersion":"10.8.2","description":"SuperTokens integration for NestJS applications","directories":{},"_nodeVersion":"20.18.2","_hasShrinkwrap":false,"devDependencies":{"rimraf":"^6.0.1","vitest":"^3.0.4","supertest":"^7.0.0","typescript":"^5.7.3","npm-run-all":"^4.1.5","@nestjs/apollo":"^13.0.4","@nestjs/graphql":"^13.0.4","@nestjs/testing":"^11.0.7","@types/supertest":"^6.0.3","@nestjs/platform-express":"^11.0.7"},"peerDependencies":{"@nestjs/core":"^11.0.1","supertokens-node":"^21.1.0 || ^22.1.0","@nestjs/platform-express":"^11.0.1","@nestjs/platform-fastify":"^11.0.6"},"peerDependenciesMeta":{"@nestjs/platform-express":{"optional":true},"@nestjs/platform-fastify":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/supertokens-nestjs_0.0.4_1749083172701_0.16357990548106427","host":"s3://npm-registry-packages-npm-production"}},"0.0.5":{"name":"supertokens-nestjs","version":"0.0.5","keywords":["supertokens","nestjs","nodejs","authentication","session-management"],"license":"Apache-2.0","_id":"supertokens-nestjs@0.0.5","maintainers":[{"name":"advaitruia","email":"advaitruia@gmail.com"},{"name":"mihalyst","email":"mihaly@supertokens.com"}],"homepage":"https://github.com/supertokens/supertokens-nestjs#readme","bugs":{"url":"https://github.com/supertokens/supertokens-nestjs/issues"},"dist":{"shasum":"862c2d6cf6f4164fb8b7789f593011076b729daf","tarball":"https://registry.npmjs.org/supertokens-nestjs/-/supertokens-nestjs-0.0.5.tgz","fileCount":138,"integrity":"sha512-AO+nVPQDXwZKqxwz1vM1NWeesCec8nip06Agu6GBG0qXjYB7RN7y0pelbRlZkXvaqD8zHU0wsQZLoG3sLxzztw==","signatures":[{"sig":"MEYCIQDH5w4mKXGE6NfjaFyp9yeEBsq5G+u3lc69yeCEgsbk0wIhAIv92uYJCRpbP6IFiJjxXLzUNMzDFplZ4kjln2QTafTs","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":2184455},"main":"dist/index.js","types":"dist/index.d.ts","exports":{".":{"types":"./index.d.ts","default":"./index.js"},"./index":{"types":"./index.d.ts","default":"./index.js"},"./index.js":{"types":"./index.d.ts","default":"./index.js"}},"gitHead":"56ae89ee5958014346cdafee565305faf6b5d412","scripts":{"test":"vitest run","build":"rimraf dist && tsc -p tsconfig.json","test:watch":"vitest","start:express":"(cd ./examples/react-frontend && npm run start) & (cd ./examples/express-backend && npm run start) & wait","start:fastify":"(cd ./examples/react-frontend && npm run start) & (cd ./examples/fastify-backend && npm run start) & wait","start:graphql":"(cd ./examples/react-frontend && npm run start) & (cd ./examples/graphql-backend && npm run start) & wait"},"_npmUser":{"name":"mihalyst","email":"mihaly@supertokens.com"},"repository":{"url":"git+https://github.com/supertokens/supertokens-nestjs.git","type":"git"},"_npmVersion":"10.8.2","description":"SuperTokens integration for NestJS applications","directories":{},"_nodeVersion":"20.18.2","_hasShrinkwrap":false,"devDependencies":{"rimraf":"^6.0.1","vitest":"^3.0.4","supertest":"^7.0.0","typescript":"^5.7.3","npm-run-all":"^4.1.5","@nestjs/apollo":"^13.0.4","@nestjs/graphql":"^13.0.4","@nestjs/testing":"^11.0.7","@types/supertest":"^6.0.3","@nestjs/platform-express":"^11.0.7"},"peerDependencies":{"@nestjs/core":"^11.0.1","supertokens-node":"^21.1.0 || ^22.1.0","@nestjs/platform-express":"^11.0.1","@nestjs/platform-fastify":"^11.0.6"},"peerDependenciesMeta":{"@nestjs/platform-express":{"optional":true},"@nestjs/platform-fastify":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/supertokens-nestjs_0.0.5_1749555144322_0.09931167407074559","host":"s3://npm-registry-packages-npm-production"}},"1.0.0":{"name":"supertokens-nestjs","version":"1.0.0","keywords":["supertokens","nestjs","nodejs","authentication","session-management"],"license":"Apache-2.0","_id":"supertokens-nestjs@1.0.0","maintainers":[{"name":"advaitruia","email":"advaitruia@gmail.com"},{"name":"mihalyst","email":"mihaly@supertokens.com"},{"name":"supertokensengteam","email":"eng@supertokens.com"}],"homepage":"https://github.com/supertokens/supertokens-nestjs#readme","bugs":{"url":"https://github.com/supertokens/supertokens-nestjs/issues"},"dist":{"shasum":"11136e8a57945661a04d69f853a796ed86860514","tarball":"https://registry.npmjs.org/supertokens-nestjs/-/supertokens-nestjs-1.0.0.tgz","fileCount":147,"integrity":"sha512-9sj9QL6Dc6k6OHMk0UPw5B2DR0cLpxkA+hzMzl5ZS9taIwfgIfy3kAXdIpYTtJJZqvTrC3Y5Gu3/UQwPQev0hA==","signatures":[{"sig":"MEUCIGobFkwu1IQpJdpqpKJQLfS8pYAhBbBeMI/fZih1pZMYAiEA0O71nGzd2H9p0zuKGPLN0ULAzQ/ZhZe60XPw4aVz3tk=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":2283918},"main":"dist/index.js","types":"dist/index.d.ts","exports":{".":{"types":"./index.d.ts","default":"./index.js"},"./index":{"types":"./index.d.ts","default":"./index.js"},"./index.js":{"types":"./index.d.ts","default":"./index.js"}},"gitHead":"dc64775a2df69efd7f22383ebc230348320d2912","scripts":{"test":"vitest run","build":"rimraf dist && tsc -p tsconfig.json","prepare":"husky","release":"npm run build && changeset publish","version":"changeset version","changeset":"changeset","test:watch":"vitest","start:express":"(cd ./examples/react-frontend && npm run start) & (cd ./examples/express-backend && npm run start) & wait","start:fastify":"(cd ./examples/react-frontend && npm run start) & (cd ./examples/fastify-backend && npm run start) & wait","start:graphql":"(cd ./examples/react-frontend && npm run start) & (cd ./examples/graphql-backend && npm run start) & wait"},"_npmUser":{"name":"supertokensengteam","email":"eng@supertokens.com"},"repository":{"url":"git+https://github.com/supertokens/supertokens-nestjs.git","type":"git"},"_npmVersion":"10.8.2","description":"SuperTokens integration for NestJS applications","directories":{},"_nodeVersion":"20.19.6","_hasShrinkwrap":false,"devDependencies":{"husky":"^9.1.7","rimraf":"^6.0.1","vitest":"^3.0.4","supertest":"^7.0.0","typescript":"^5.7.3","npm-run-all":"^4.1.5","@nestjs/apollo":"^13.0.4","@changesets/cli":"^2.29.7","@commitlint/cli":"^19.8.1","@nestjs/graphql":"^13.0.4","@nestjs/testing":"^11.0.7","@types/supertest":"^6.0.3","@nestjs/platform-express":"^11.0.7","@commitlint/config-conventional":"^19.8.1"},"peerDependencies":{"@nestjs/core":"^11.0.1","supertokens-node":"^24.0.0","@nestjs/platform-express":"^11.0.1","@nestjs/platform-fastify":"^11.0.6"},"peerDependenciesMeta":{"@nestjs/platform-express":{"optional":true},"@nestjs/platform-fastify":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/supertokens-nestjs_1.0.0_1767874497415_0.6501810246789483","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"supertokens-nestjs","version":"1.0.1","description":"SuperTokens integration for NestJS applications","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"build":"rimraf dist && tsc -p tsconfig.json","start:express":"(cd ./examples/react-frontend && npm run start) & (cd ./examples/express-backend && npm run start) & wait","start:fastify":"(cd ./examples/react-frontend && npm run start) & (cd ./examples/fastify-backend && npm run start) & wait","start:graphql":"(cd ./examples/react-frontend && npm run start) & (cd ./examples/graphql-backend && npm run start) & wait","test":"vitest run","test:watch":"vitest","changeset":"changeset","version":"changeset version","release":"npm run build && changeset publish","prepare":"husky"},"repository":{"type":"git","url":"git+https://github.com/supertokens/supertokens-nestjs.git"},"exports":{".":{"types":"./index.d.ts","default":"./index.js"},"./index":{"types":"./index.d.ts","default":"./index.js"},"./index.js":{"types":"./index.d.ts","default":"./index.js"}},"keywords":["supertokens","nestjs","nodejs","authentication","session-management"],"license":"Apache-2.0","peerDependencies":{"@nestjs/core":"^11.0.1","@nestjs/platform-express":"^11.0.1","@nestjs/platform-fastify":"^11.0.6","supertokens-node":"^24.0.0"},"peerDependenciesMeta":{"@nestjs/platform-express":{"optional":true},"@nestjs/platform-fastify":{"optional":true}},"devDependencies":{"@changesets/cli":"^2.29.7","@commitlint/cli":"^19.8.1","@commitlint/config-conventional":"^19.8.1","@nestjs/apollo":"^13.0.4","@nestjs/graphql":"^13.0.4","@nestjs/platform-express":"^11.0.7","@nestjs/testing":"^11.0.7","@types/supertest":"^6.0.3","husky":"^9.1.7","npm-run-all":"^4.1.5","rimraf":"^6.0.1","supertest":"^7.0.0","typescript":"^5.7.3","vitest":"^3.0.4"},"_id":"supertokens-nestjs@1.0.1","gitHead":"dcfb18f05cf6b53d48899da31e76104123355a75","bugs":{"url":"https://github.com/supertokens/supertokens-nestjs/issues"},"homepage":"https://github.com/supertokens/supertokens-nestjs#readme","_nodeVersion":"20.20.0","_npmVersion":"10.8.2","dist":{"integrity":"sha512-zg2TQFFMRtWLcCR482mc4f8msXKhghyAxSkMTZhIKcQO3ZsQqpp3sJ1a5TcBSqEvV3+YEB00DKDodp1yVvUuCw==","shasum":"8281d8d475ba85b2c7e562617acacd316be45989","tarball":"https://registry.npmjs.org/supertokens-nestjs/-/supertokens-nestjs-1.0.1.tgz","fileCount":156,"unpackedSize":2306939,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIAvy8KgnpcIab6e4xbhsIsYpo3EG7RDmncCvOeLuzT7eAiEAlTROl++y3h15mLSmAnsxGKHGl8tTObjPbAxu1LBHFF0="}]},"_npmUser":{"name":"supertokensengteam","email":"eng@supertokens.com"},"directories":{},"maintainers":[{"name":"advaitruia","email":"advaitruia@gmail.com"},{"name":"mihalyst","email":"mihaly@supertokens.com"},{"name":"supertokensengteam","email":"eng@supertokens.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/supertokens-nestjs_1.0.1_1770027492303_0.9689904944875654"},"_hasShrinkwrap":false}},"time":{"created":"2025-03-04T23:21:32.605Z","modified":"2026-02-02T10:18:12.617Z","0.0.1":"2025-03-04T23:21:32.849Z","0.0.2":"2025-03-06T09:39:47.097Z","0.0.3":"2025-05-09T05:26:50.011Z","0.0.4":"2025-06-05T00:26:12.989Z","0.0.5":"2025-06-10T11:32:24.705Z","1.0.0":"2026-01-08T12:14:57.659Z","1.0.1":"2026-02-02T10:18:12.479Z"},"bugs":{"url":"https://github.com/supertokens/supertokens-nestjs/issues"},"license":"Apache-2.0","homepage":"https://github.com/supertokens/supertokens-nestjs#readme","keywords":["supertokens","nestjs","nodejs","authentication","session-management"],"repository":{"type":"git","url":"git+https://github.com/supertokens/supertokens-nestjs.git"},"description":"SuperTokens integration for NestJS applications","maintainers":[{"name":"advaitruia","email":"advaitruia@gmail.com"},{"name":"mihalyst","email":"mihaly@supertokens.com"},{"name":"supertokensengteam","email":"eng@supertokens.com"}],"readme":"![SuperTokens banner](https://raw.githubusercontent.com/supertokens/supertokens-logo/master/images/Artboard%20%E2%80%93%2027%402x.png)\n\n# SuperTokens Nestjs\n\n<a href=\"https://supertokens.com/discord\">\n<img src=\"https://img.shields.io/discord/603466164219281420.svg?logo=discord\"\n    alt=\"chat on Discord\"></a>\n\n## Description\n\nThe library makes it easier to use SuperTokens in NestJS applications.\nIt does that by exposing NestJS entities (modules, guards, decorators, etc.) which abstract some of the logic that a user would normally need to write by themselves.\nThat being said, the library **does not** include any additional functionality besides what you can create with the SuperTokens Node SDK.\n\n## Usage\n\n### 1. Install the dependencies\n\n```bash\nnpm install supertokens-node supertokens-nestjs\n```\n\n### 2. Initialize the `SuperTokensModule` inside your main application module\n\n```ts\nimport { Module } from '@nestjs/common'\nimport { SuperTokensModule } from 'supertokens-nestjs'\n\n@Module({\n  imports: [\n    SuperTokensModule.forRoot({\n      framework: 'express',\n      supertokens: {\n        connectionURI: '...',\n      },\n      appInfo: {\n        appName: '...',\n        apiDomain: '...',\n        websiteDomain: '...',\n      },\n      recipeList: [\n        /* ... */\n      ],\n    }),\n  ],\n  controllers: [\n    /* ... */\n  ],\n  providers: [\n    /* ... */\n  ],\n})\nexport class AppModule {}\n```\n\n### 3. Add the `SuperTokensAuthGuard` to protect your routes\n\n#### Option 1: As a global guard\n\n```ts\nimport { Module } from '@nestjs/common'\nimport { APP_GUARD } from '@nestjs/core'\nimport { SuperTokensAuthGuard } from 'supertokens-nestjs'\n\n@Module({\n  imports: [\n    /* ... */\n  ],\n  controllers: [\n    /* ... */\n  ],\n  providers: [\n    {\n      provide: APP_GUARD,\n      useClass: SuperTokensAuthGuard,\n    },\n  ],\n})\nexport class AppModule {}\n```\n\n#### Option 2: As a controller guard\n\n```ts\nimport { Controller, UseGuards } from '@nestjs/common'\nimport { SuperTokensAuthGuard } from 'supertokens-nestjs'\n\n@Controller()\n@UseGuards(SuperTokensAuthGuard)\nexport class AppController {}\n```\n\n### 4. Add the CORS config and the exception filter in your `bootstrap` function\n\nFor Express:\n```ts\nimport supertokens from 'supertokens-node'\nimport { SuperTokensExceptionFilter } from 'supertokens-nestjs'\nimport { appInfo } from './config'\n\nasync function bootstrap() {\n  const app = await NestFactory.create(AppModule)\n  app.enableCors({\n    origin: [appInfo.websiteDomain],\n    allowedHeaders: ['content-type', ...supertokens.getAllCORSHeaders()],\n    credentials: true,\n  })\n  app.useGlobalFilters(new SuperTokensExceptionFilter())\n\n  await app.listen(3001)\n}\n```\n\nFor Fastify, use `SuperTokensFastifyExceptionFilter` instead of `SuperTokensExceptionFilter`.\n\n\n### 5. Use the provided decorators to customize the route protection logic and access the authentication state\n\n```ts\nimport { Controller, Delete, Get, Patch, Post } from '@nestjs/common'\nimport { PublicAccess, Session, VerifySession } from 'supertokens-nestjs'\n\n@Controller()\nclass AppController {\n  @Get('/user')\n  @VerifySession()\n  async getUserInfo(@Session('userId') userId: string) {}\n\n  @Get('/user/:userId')\n  @VerifySession({\n    roles: ['admin'],\n  })\n  async deleteUser() {}\n\n  @Get('/user/profile')\n  @PublicAccess()\n  async getUserProfile() {}\n}\n```\n","readmeFilename":"README.md"}