{"_id":"@aimform/auth","_rev":"5-53733f915d0968c4c4ca0b0ebc2dfc50","name":"@aimform/auth","dist-tags":{"latest":"0.3.1"},"versions":{"0.1.0":{"name":"@aimform/auth","version":"0.1.0","keywords":["aimform","auth","openauth","oauth2","profiles","organizations"],"author":{"name":"Universal Reason LLC"},"license":"MIT","_id":"@aimform/auth@0.1.0","maintainers":[{"name":"adamhalasz","email":"mail@adamhalasz.com"}],"homepage":"https://aimform.com","bugs":{"url":"https://github.com/aimform/auth/issues"},"dist":{"shasum":"ea0bb2e23e1a9ea15c61383ae11fb01a0c522da2","tarball":"https://registry.npmjs.org/@aimform/auth/-/auth-0.1.0.tgz","fileCount":4,"integrity":"sha512-dDDaNrB+gLfzNFDoG/W8pmdKDCzq2P0p1AyJjUAQMn2Zyb3MtF76TQDjZ0p9RjBOhIFOsnVySgkZQlgbDXUn2w==","signatures":[{"sig":"MEUCICMjR8mv2X3BLXI8znMnI9ByZafbg0qk/2NTJXijvvcgAiEA7vY3kmY2fPl7Y3SeL54ZaqzU5/YrSlZgSVt3f8uwq2g=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":6235},"type":"module","exports":{".":{"types":"./src/index.ts","import":"./src/index.ts"}},"gitHead":"1fddd1fa01a88537aafed215960e3af2edc47423","scripts":{"test":"vitest run","typecheck":"tsc --noEmit","test:coverage":"vitest run --coverage"},"_npmUser":{"name":"adamhalasz","email":"mail@adamhalasz.com"},"repository":{"url":"git+https://github.com/aimform/auth.git","type":"git"},"_npmVersion":"11.8.0","description":"Aimform Auth — authentication (OpenAuth/OAuth2), user profiles, organizations, API tokens, and consent management.","directories":{},"sideEffects":false,"_nodeVersion":"25.6.0","dependencies":{"@aimform/core":"workspace:*"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^3.0.0","typescript":"^5.7.0","@vitest/coverage-istanbul":"^3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/auth_0.1.0_1785277510118_0.7364905393536842","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@aimform/auth","version":"0.1.1","keywords":["aimform","auth","openauth","oauth2","profiles","organizations"],"author":{"name":"Universal Reason LLC"},"license":"MIT","_id":"@aimform/auth@0.1.1","maintainers":[{"name":"adamhalasz","email":"mail@adamhalasz.com"}],"homepage":"https://aimform.com","bugs":{"url":"https://github.com/aimform/auth/issues"},"dist":{"shasum":"bcb8e9fae6fd678a83fb17f72a9630403dc605f7","tarball":"https://registry.npmjs.org/@aimform/auth/-/auth-0.1.1.tgz","fileCount":5,"integrity":"sha512-LkZqxtQesLtcM8u7NRJAuP5ePtcBsT+owN6axW7tagibIh3lnTewOEPAw6pMosu1orwC/USw27+2+z72zW9/4Q==","signatures":[{"sig":"MEUCIQDZguW8S44HL793+KSvjd0bJXDU0gLFW1cVUT3ieUoLlwIgIaGcTfgnnyKnhhWv52NtVIOrg6HHOjZhDElSVDASSz0=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":9394},"type":"module","exports":{".":{"types":"./src/index.ts","import":"./src/index.ts"}},"gitHead":"0029a52482d8a625db9e2caaabce1376aa97650e","scripts":{"test":"vitest run","typecheck":"tsc --noEmit","test:coverage":"vitest run --coverage"},"_npmUser":{"name":"adamhalasz","email":"mail@adamhalasz.com"},"repository":{"url":"git+https://github.com/aimform/auth.git","type":"git"},"_npmVersion":"11.8.0","description":"Aimform Auth — authentication (OpenAuth/OAuth2), user profiles, organizations, API tokens, and consent management.","directories":{},"sideEffects":false,"_nodeVersion":"25.6.0","dependencies":{"@aimform/core":"workspace:*"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^3.0.0","typescript":"^5.7.0","@vitest/coverage-istanbul":"^3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/auth_0.1.1_1785277686879_0.40239704815710553","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"@aimform/auth","version":"0.1.2","keywords":["aimform","auth","openauth","oauth2","profiles","organizations"],"author":{"name":"Universal Reason LLC"},"license":"MIT","_id":"@aimform/auth@0.1.2","maintainers":[{"name":"adamhalasz","email":"mail@adamhalasz.com"}],"homepage":"https://aimform.com","bugs":{"url":"https://github.com/aimform/auth/issues"},"dist":{"shasum":"c500c75e8f775a67567fd3351c9aebc626922527","tarball":"https://registry.npmjs.org/@aimform/auth/-/auth-0.1.2.tgz","fileCount":5,"integrity":"sha512-+E0LYBmj3qNoIqRSkmQKtYwftb1+bs7RSbwwOL355F2YTHDzmv7M5ZxOw+PoBoahvTse9Oyo4+TW5SOcehCDpA==","signatures":[{"sig":"MEYCIQDFvM9Tggx53kBFT83duWS9ziK4zpdnno7GnBAvN84zhwIhAIOvL22Zu2POA6c/NuLNHgejGlLIHJjknbsRh1FHoM6f","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":9333},"type":"module","exports":{".":{"types":"./src/index.ts","import":"./src/index.ts"}},"gitHead":"0029a52482d8a625db9e2caaabce1376aa97650e","scripts":{"test":"vitest run","typecheck":"tsc --noEmit","test:coverage":"vitest run --coverage"},"_npmUser":{"name":"adamhalasz","email":"mail@adamhalasz.com"},"repository":{"url":"git+https://github.com/aimform/auth.git","type":"git"},"_npmVersion":"11.8.0","description":"Aimform Auth — authentication (OpenAuth/OAuth2), user profiles, organizations, API tokens, and consent management.","directories":{},"sideEffects":false,"_nodeVersion":"25.6.0","dependencies":{"@aimform/core":"workspace:*"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^3.0.0","typescript":"^5.7.0","@vitest/coverage-istanbul":"^3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/auth_0.1.2_1785277804796_0.24382099668232082","host":"s3://npm-registry-packages-npm-production"}},"0.3.0":{"name":"@aimform/auth","version":"0.3.0","keywords":["aimform","auth","openauth","oauth2","profiles","organizations"],"author":{"name":"Universal Reason LLC"},"license":"MIT","_id":"@aimform/auth@0.3.0","maintainers":[{"name":"adamhalasz","email":"mail@adamhalasz.com"}],"homepage":"https://aimform.com","bugs":{"url":"https://github.com/aimform/auth/issues"},"dist":{"shasum":"3a284120951708cffbf076b4df53107bba556b04","tarball":"https://registry.npmjs.org/@aimform/auth/-/auth-0.3.0.tgz","fileCount":6,"integrity":"sha512-IvbpngoyrddzkiACJGDsXAoyvmDsybccoh/jTgu9W2rgpsTWoUsEam6TJRcK3YLAn+u+UmNb7BtMs1wHNVEGSw==","signatures":[{"sig":"MEUCIQChXzI93GW/5rEDHOHiNbHKKfU9WUZjyvba9d3tIm4sBAIgAXKHcBfTuFMnahs4qMC3fdgErmqYH0Dx60Uu/1VQGL8=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":10174},"type":"module","exports":{".":{"types":"./src/index.ts","import":"./src/index.ts"}},"gitHead":"13f365472483b956d2fba2f162ec831656c168f5","scripts":{"test":"vitest run","typecheck":"tsc --noEmit","test:coverage":"vitest run --coverage"},"_npmUser":{"name":"adamhalasz","email":"mail@adamhalasz.com"},"repository":{"url":"git+https://github.com/aimform/auth.git","type":"git"},"_npmVersion":"11.8.0","description":"Aimform Auth — authentication (OpenAuth/OAuth2), user profiles, organizations, API tokens, and consent management.","directories":{},"sideEffects":false,"_nodeVersion":"25.6.0","dependencies":{"@aimform/core":"workspace:*"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^3.0.0","typescript":"^5.7.0","@vitest/coverage-istanbul":"^3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/auth_0.3.0_1785278537923_0.878215193933463","host":"s3://npm-registry-packages-npm-production"}},"0.3.1":{"name":"@aimform/auth","version":"0.3.1","description":"Aimform Auth — authentication (OpenAuth/OAuth2), user profiles, organizations, API tokens, and consent management.","type":"module","license":"MIT","sideEffects":false,"exports":{".":{"types":"./src/index.ts","import":"./src/index.ts"},"./adapters":{"types":"./src/adapters/index.ts","import":"./src/adapters/index.ts"}},"scripts":{"typecheck":"tsc --noEmit","test":"vitest run","test:coverage":"vitest run --coverage"},"dependencies":{"@aimform/core":"workspace:*"},"devDependencies":{"typescript":"^5.7.0","vitest":"^3.0.0","@vitest/coverage-istanbul":"^3.0.0","@cloudflare/workers-types":"^4.20250224.0"},"repository":{"type":"git","url":"git+https://github.com/aimform/auth.git"},"keywords":["aimform","auth","openauth","oauth2","profiles","organizations"],"author":{"name":"Universal Reason LLC"},"homepage":"https://aimform.com","gitHead":"b493ee3f79615339e6ab68f3d47d6675575a9ef5","_id":"@aimform/auth@0.3.1","bugs":{"url":"https://github.com/aimform/auth/issues"},"_nodeVersion":"25.6.0","_npmVersion":"11.8.0","dist":{"integrity":"sha512-wCRm/kBlQQAt/p/v6a+NG1kNeryrZlTO1xjB+UQ05v/ZxHvQlp2opQc1A7JgzxWp3Ik9dmiMML3s+CQCcuzAdA==","shasum":"80124c88a6a926025ab1ca2ded0e3c57d2778b70","tarball":"https://registry.npmjs.org/@aimform/auth/-/auth-0.3.1.tgz","fileCount":13,"unpackedSize":56798,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDx1310aNAufOQt0XnTytVLJajxexw3biJutxUfen/D8wIgBMemj1R9fXxtDCkuhBq2v43zlLQiIc9YqR1aGYimDXs="}]},"_npmUser":{"name":"adamhalasz","email":"mail@adamhalasz.com"},"directories":{},"maintainers":[{"name":"adamhalasz","email":"mail@adamhalasz.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/auth_0.3.1_1785342979879_0.2767174896950739"},"_hasShrinkwrap":false}},"time":{"created":"2026-07-28T22:25:10.026Z","modified":"2026-07-29T16:36:20.237Z","0.1.0":"2026-07-28T22:25:10.268Z","0.1.1":"2026-07-28T22:28:07.038Z","0.1.2":"2026-07-28T22:30:04.928Z","0.3.0":"2026-07-28T22:42:18.159Z","0.3.1":"2026-07-29T16:36:20.031Z"},"bugs":{"url":"https://github.com/aimform/auth/issues"},"author":{"name":"Universal Reason LLC"},"license":"MIT","homepage":"https://aimform.com","keywords":["aimform","auth","openauth","oauth2","profiles","organizations"],"repository":{"type":"git","url":"git+https://github.com/aimform/auth.git"},"description":"Aimform Auth — authentication (OpenAuth/OAuth2), user profiles, organizations, API tokens, and consent management.","maintainers":[{"name":"adamhalasz","email":"mail@adamhalasz.com"}],"readme":"# @aimform/auth\n\n> Authentication (OpenAuth/OAuth2), user profiles, organizations, API tokens, and consent management.\n\n## Install\n\n```sh\nnpm install @aimform/auth @aimform/core\n```\n\n## Usage\n\n```ts\nimport { Auth, Profiles, Orgs, Members, Tokens } from \"@aimform/auth\";\n\n// D1\nconst auth = new Auth({ database: env.DB });\nconst profiles = new Profiles({ database: env.DB });\nconst members = new Members({ database: env.DB });\n\n// Platform API\nconst aimform = createAimform({ apiKey: \"af_xxx\" });\nconst auth = new Auth({ client: aimform.client });\n```\n\n### Auth\n\n```ts\nimport { Auth } from \"@aimform/auth\";\n\nconst auth = new Auth({ database: db });\nconst session = await auth.register(\"jane@example.com\", \"Jane Doe\", \"password123\");\nconst session = await auth.login(\"jane@example.com\", \"password123\");\nconst user = await auth.validateSession(session.token);\nawait auth.invalidateSession(session.token);\nawait auth.getUser(\"user_123\");\nawait auth.forgotPassword(\"jane@example.com\");\nawait auth.resetPassword(\"token\", \"newPassword\");\nawait auth.requestMagicLink(\"jane@example.com\");\n```\n\n→ [Auth docs](./docs/auth.md)\n\n### Profiles\n\n```ts\nimport { Profiles } from \"@aimform/auth\";\n\nconst profiles = new Profiles({ database: db });\nawait profiles.get(\"prof_123\");\nawait profiles.listByUser(\"user_123\");\nawait profiles.create({ displayName: \"Work Profile\", profileType: \"adult\" });\nawait profiles.update(\"prof_123\", { displayName: \"Updated\" });\nawait profiles.delete(\"prof_123\");\n```\n\n→ [Profiles docs](./docs/profiles.md)\n\n### Orgs\n\n```ts\nimport { Orgs } from \"@aimform/auth\";\n\nconst orgs = new Orgs({ database: db });\nawait orgs.get(\"org_456\");\nawait orgs.listByMember(\"prof_123\");\nawait orgs.create({ name: \"My Team\", slug: \"my-team\" });\nawait orgs.update(\"org_456\", { name: \"Renamed\" });\nawait orgs.delete(\"org_456\");\n```\n\n→ [Orgs docs](./docs/orgs.md)\n\n### Members\n\n```ts\nimport { Members } from \"@aimform/auth\";\n\nconst members = new Members({ database: db });\nawait members.list(\"org_456\");\nawait members.invite(\"org_456\", { email: \"alex@example.com\", role: \"editor\" });\nawait members.update(\"org_456\", \"prof_789\", { role: \"admin\" });\nawait members.remove(\"org_456\", \"prof_789\");\n```\n\n→ [Members docs](./docs/members.md)\n\n### Tokens\n\n```ts\nimport { Tokens } from \"@aimform/auth\";\n\nconst tokens = new Tokens({ database: db });\nconst { token } = await tokens.create(\"prof_123\");\nawait tokens.list(\"prof_123\");\nawait tokens.revoke(\"tok_123\");\n```\n\n→ [Tokens docs](./docs/tokens.md)\n\n→ [Creating custom adapters](./docs/custom-adapters.md)\n","readmeFilename":"README.md"}