What problem does it solve? Hardening a Better Auth deployment requires coordinating many scattered security settings—secrets, rate limits, CSRF checks, cookies, OAuth token encryption, and audit logging—and missing 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 origins including wildcard and dynamic patterns. - OAuth & Audit Security: Encrypt stored OAuth tokens with AES-256-GCM, configure PKCE state strategies, track client IPs behind proxies, and implement audit logging via 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.