Files
andon/package.json
Julien Calixte 82ac540909 feat(auth): Google OAuth, sealed session and default-deny gating (T9)
Gate the app behind Google sign-in restricted to verified @theodo.com
identities, and record the real reporter on filed defects (F9).

- nuxt-auth-utils for sealed cookie sessions + the Google OAuth handler,
  mounted at /auth/google/callback to match the registered redirect URI.
- isAllowedGoogleUser re-derives the domain from Google's verified email;
  the spoofable `hd` claim is deliberately ignored (DESIGN T9).
- Default-deny: server middleware 401s unauthenticated /api calls (health
  and the session endpoint excepted); a global route middleware redirects
  unauthenticated page navigations to /login.
- getReporter() now reads the session email instead of the dev stub.
- Env contract moves to nuxt-auth-utils names (NUXT_SESSION_PASSWORD,
  NUXT_OAUTH_GOOGLE_*); .env.example, compose and README updated.

Unit-tested: domain check (incl. hd-spoof + look-alike) and public-path
matching. Live OAuth round-trip pending manual verification.
2026-05-28 01:09:48 +02:00

49 lines
1.3 KiB
JSON

{
"name": "andon",
"type": "module",
"private": true,
"packageManager": "pnpm@11.0.9",
"scripts": {
"build": "nuxt build",
"dev": "nuxt dev",
"generate": "nuxt generate",
"preview": "nuxt preview",
"postinstall": "nuxt prepare",
"lint": "eslint .",
"test": "vitest run",
"test:watch": "vitest",
"typecheck": "nuxt typecheck",
"db:generate": "drizzle-kit generate",
"db:migrate": "tsx server/db/migrate.ts",
"db:seed": "tsx server/db/seed.ts",
"db:verify": "tsx scripts/verify-db.ts",
"docker:dev": "docker compose -f docker-compose.dev.yml up",
"docker:dev:build": "docker compose -f docker-compose.dev.yml up --build",
"docker:dev:down": "docker compose -f docker-compose.dev.yml down"
},
"dependencies": {
"arktype": "^2.2.0",
"drizzle-orm": "^0.45.2",
"nuxt": "^4.4.6",
"nuxt-auth-utils": "^0.5.29",
"pg": "^8.21.0",
"vue": "^3.5.34",
"vue-router": "^5.0.7"
},
"devDependencies": {
"@nuxt/eslint": "^1.15.2",
"@nuxt/test-utils": "^4.0.3",
"@tailwindcss/vite": "^4.3.0",
"@types/pg": "^8.20.0",
"@vue/test-utils": "^2.4.10",
"daisyui": "^5.5.20",
"drizzle-kit": "^0.31.10",
"eslint": "^10.4.0",
"happy-dom": "^20.9.0",
"tailwindcss": "^4.3.0",
"tsx": "^4.22.3",
"typescript": "^6.0.3",
"vitest": "^4.1.7"
}
}