dorfteich/apps/api/package.json
Claude Fable 5 bed9fc9307 Add authentication: signup, verification, sessions, password reset
AuthModule implements the M1 core as one coherent unit:

Signup (#13): POST signup/verify-email/resend-verification with shared
Zod validation (field-level error details), double opt-in via hashed
single-use tokens (24h, superseding reissue), registration_mode
enforcement, and per-IP rate limits.

Sessions (#14): opaque 32-byte cookie tokens stored as SHA-256 row
ids, sliding 30-day expiry (refresh at most hourly), global AuthGuard
with @Public() opt-out attaching the user to every request, CSRF
origin check on mutating requests, per-account login backoff (5/15min,
reset on success), generic 401 for wrong-vs-unknown credentials,
logout with immediate invalidation, GET /auth/me.

Reset (#15): forgot-password without account enumeration, one-hour
single-use tokens, reset destroys all existing sessions.

A 14-case supertest e2e suite drives every flow against the test
database, reading verification/reset links from the mail outbox.

Closes #13
Closes #14
Closes #15

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-05 05:22:31 +02:00

48 lines
1.3 KiB
JSON

{
"name": "@dorfteich/api",
"version": "0.0.0",
"private": true,
"description": "Dorfteich REST API server",
"license": "MIT",
"scripts": {
"build": "prisma generate && nest build",
"start": "node dist/main.js",
"start:dev": "prisma generate && nest start --watch",
"typecheck": "tsc --noEmit",
"test": "vitest run --passWithNoTests",
"db:migrate:dev": "prisma migrate dev",
"db:seed": "tsx prisma/seed.ts"
},
"dependencies": {
"@dorfteich/shared": "workspace:*",
"@nestjs/common": "^11.0.0",
"@nestjs/core": "^11.0.0",
"@nestjs/platform-express": "^11.0.0",
"@prisma/client": "^6.3.0",
"argon2": "^0.44.0",
"cookie-parser": "^1.4.7",
"i18next": "^26.3.4",
"nestjs-pino": "^4.3.0",
"nodemailer": "^9.0.3",
"pino": "^9.6.0",
"pino-http": "^10.4.0",
"prisma": "^6.3.0",
"reflect-metadata": "^0.2.2",
"rxjs": "^7.8.0"
},
"devDependencies": {
"@nestjs/cli": "^11.0.0",
"@nestjs/testing": "^11.0.0",
"@swc/core": "^1.10.0",
"@types/cookie-parser": "^1.4.10",
"@types/express": "^5.0.0",
"@types/nodemailer": "^8.0.1",
"@types/supertest": "^6.0.0",
"pino-pretty": "^13.0.0",
"supertest": "^7.0.0",
"tsx": "^4.19.0",
"unplugin-swc": "^1.5.0",
"vitest": "^3.0.0"
}
}