better-auth-security-best-practices

Configure Better Auth security settings for authentication protection.

Updated Feb 6, 2026
One-click install
npx skills add https://github.com/tylrd/homeschooltracker --skill better-auth-security-best-practices-tylrd
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: better-auth-security-best-practices
Source: https://github.com/tylrd/homeschooltracker/tree/main/.agents/skills/better-auth-security-best-practices
Command: npx skills add https://github.com/tylrd/homeschooltracker --skill better-auth-security-best-practices-tylrd

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides comprehensive guidance and configuration options to secure authentication systems, preventing common vulnerabilities like brute-force attacks, CSRF, and data breaches.

Core Features & Use Cases

  • Robust Security Configurations: Covers secret management, rate limiting, CSRF protection, session security, and trusted origins.
  • OAuth & IP Security: Details secure practices for social logins and IP-based threat mitigation.
  • Use Case: A developer needs to implement secure authentication for a new web application. They can consult this Skill to understand how to configure rate limits on login attempts, set up secure session cookies, and define trusted domains for redirects, ensuring a strong security posture from the outset.

Quick Start

Configure Better Auth to use a strong secret and enable rate limiting for sign-in endpoints.

Frequently Asked Questions about better-auth-security-best-practices

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I configure rate limiting for authentication endpoints in Better Auth?▼

Rate limiting in Better Auth restricts rapid repeated requests to login endpoints. You configure it within the security options to enforce a threshold on sign-in attempts, mitigating brute-force attacks against user accounts.

What's the best way to secure session cookies and manage trusted origins?▼

Securing session cookies involves setting strict attributes within the Better Auth configuration. You define trusted origins explicitly to prevent unauthorized domain access, ensuring session data remains protected against cross-site threats.

How does Better Auth handle CSRF protection for web applications?▼

CSRF protection in Better Auth validates incoming requests against trusted origins and session tokens. This mechanism prevents unauthorized sites from forging authenticated requests, mitigating cross-site request forgery vulnerabilities effectively.

Can I use Better Auth to secure OAuth social login integrations?▼

Better Auth supports secure OAuth configurations for social logins. It provides specific settings to validate tokens, manage redirect domains, and prevent authorization code interception during third-party authentication flows.

What security configurations do I need to set up when starting a new web app with Better Auth?▼

Starting a new web app requires configuring a strong secret key, enabling rate limiting, and defining trusted origins. These baseline configurations establish a strong security posture from the outset against common vulnerabilities.