Sposta l'autenticazione da Supabase a PocketBase

Login Google via PocketBase invece che Supabase Auth: nuovi client
in src/integrations/pocketbase/ (browser, server con superuser, attacher
del bearer token per le server function). Il ruolo admin/user vive ora
come campo diretto sul record utente PocketBase invece che nella tabella
separata user_roles, quindi ruoli.ts e la verifica in auth-route.server.ts
non hanno più bisogno di una query aggiuntiva.

requireSupabaseAuth/auth-middleware.ts non viene riportato: non era
importato da nessun file, era codice morto.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
2026-09-11 14:58:09 +02:00
co-authored by Claude Sonnet 5
parent 15885f32c7
commit 0f5a27ed5f
10 changed files with 160 additions and 87 deletions
+5 -1
View File
@@ -14,7 +14,10 @@
"test": "bun test/run.ts",
"test:integration": "bun test/run.ts integration",
"test:e2e": "bun test/run.ts e2e",
"test:all": "bun test/run.ts all"
"test:all": "bun test/run.ts all",
"pocketbase:start": "docker compose -f docker-compose.pocketbase.yml up -d",
"pocketbase:stop": "docker compose -f docker-compose.pocketbase.yml down",
"pocketbase:reset": "bash scripts/pocketbase-reset.sh"
},
"dependencies": {
"@supabase/supabase-js": "^2.111.0",
@@ -27,6 +30,7 @@
"clsx": "^2.1.1",
"lucide-react": "^0.575.0",
"motion": "^13.2.0",
"pocketbase": "^0.28.1",
"react": "^19.2.0",
"react-dom": "^19.2.0",
"sonner": "^2.0.7",