Better Auth + Next.js + PostgreSQL Hardening Guide
Production security checklist for self-hosted Better Auth: trustedOrigins, secure cookies, rate limiting, Passkeys, and Drizzle/PostgreSQL pooling.
SKILL.md)Drop-in hardening instructions for Cursor, Claude Code, and Lovable covering Better Auth, Supabase RLS, OAuth CSRF/open redirects, and Passkeys Conditional UI.
Production security checklist for self-hosted Better Auth: trustedOrigins, secure cookies, rate limiting, Passkeys, and Drizzle/PostgreSQL pooling.
Eliminate login open redirects (?next=//evil.com), lock down Set-Cookie attributes, and enforce strict HSTS and clickjacking defenses.
Implement WebAuthn Conditional Mediation (autocomplete='username webauthn'), accessible labels, and >=16px mobile inputs without breaking 1Password or iCloud Keychain.
Prevent CVE-2025-48757 style data leaks: strict PostgreSQL Row Level Security policies, never exposing service_role in Vite/Next bundles, and safe PostgREST schemas.