Phase 1: token schemas and anon RLS check script

tokens.ts validates link tokens (32 hex chars) before any DB query.
check:rls proves the anon key cannot read or insert on any table, and
fails loudly if the migration has not been applied.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-03 12:49:53 +02:00
co-authored by Claude Opus 5.5
parent c89a82295b
commit b134f87326
4 changed files with 90 additions and 1 deletions
+2 -1
View File
@@ -8,7 +8,8 @@
"start": "next start",
"lint": "eslint",
"test": "vitest run",
"test:watch": "vitest"
"test:watch": "vitest",
"check:rls": "node --env-file=.env.local scripts/check-rls.mjs"
},
"dependencies": {
"@supabase/ssr": "^0.12.7",