What problem does it solve? Hardening a Better Auth deployment requires coordinating many security settings—secrets, rate limits, CSRF checks, trusted origins, cookies, and OAuth token encryption—and misconfiguring any one of them leaves the authentication layer exposed to brute force, session hijacking, or account enumeration attacks. ## Core Features & Use Cases - Rate Limiting & Brute Force Defense: Configure global and per-endpoint rate limits with memory, database, or Redis-backed storage, including stricter rules for sign-in and sign-up endpoints. - Session, Cookie & CSRF Hardening: Set session expiration, encrypted cookie caches (compact, JWT, or JWE), secure cookie attributes, cross-subdomain cookies, and multi-layer CSRF protection with trusted origin validation including wildcards and dynamic per-tenant origins. - OAuth & Audit Security: Encrypt stored OAuth tokens with AES-256-GCM, configure PKCE state strategies, track client IPs behind proxies, and implement audit logging through database hooks. - Use Case: Before launching a SaaS app, apply the complete security configuration example and run through the production checklist to verify secrets, HTTPS, trusted origins, and rate limits are all correctly set. ## Quick Start Ask the AI to review your Better Auth configuration and apply the security best practices for rate limiting, trusted origins, and session cookies.