better-auth-security-best-practices

Configure Better Auth deployments with security best practices for Node.js and TypeScript.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/iptoux/localvoice --skill better-auth-security-best-practices-iptoux
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: better-auth-security-best-practices
Source: https://github.com/iptoux/localvoice/tree/main/.claude/skills/better-auth-security-best-practices
Command: npx skills add https://github.com/iptoux/localvoice --skill better-auth-security-best-practices-iptoux

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps teams implement robust authentication security by guiding the configuration of rate limiting, secret management, CSRF protection, trusted origins, secure sessions and cookies, OAuth token encryption, IP tracking, and audit logging for Better Auth deployments.

Core Features & Use Cases

  • Rate limiting and abuse prevention for authentication endpoints to mitigate brute force attempts.
  • Secret management and secure handling to prevent leakage and unauthorized access.
  • CSRF protection and trusted origins configuration to defend against cross-site attacks.
  • Session and cookie hardening (expiresIn, cookie attributes, encryption) to improve defense in depth.
  • OAuth token encryption and secure storage to protect tokens at rest.
  • IP address tracking behind proxies and auditing hooks for observability.
  • Audit logging via database hooks to detect and respond to security events.
  • Guidance for serverless and background tasks to ensure compliance on diverse platforms.

Quick Start

Configure your Better Auth deployment by applying the included security best-practice patterns.

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 and CSRF protection for Better Auth endpoints?

Configure rate limiting and CSRF protection for Better Auth by applying best-practice security patterns that mitigate brute force attempts and defend against cross-site attacks. This enforces trusted origins and prevents endpoint abuse.

What is the best way to harden session cookies and encrypt OAuth tokens in Node.js?

Harden session cookies and encrypt OAuth tokens in Node.js by implementing secure session and cookie attributes alongside OAuth token encryption. This protects tokens at rest and improves defense in depth for web applications.

How does IP address tracking behind proxies work for authentication audit logging?

IP address tracking behind proxies works for authentication audit logging by capturing client IP addresses and routing them through database hooks, providing observability to detect and respond to security events in web applications.

Can I apply these authentication security best practices in serverless and background task environments?

Yes, you can apply these authentication security best practices in serverless and background task environments. The Skill provides specific guidance to ensure compliance and secure secret management across diverse platforms like Node.js and TypeScript.

How do I prevent secret leakage and unauthorized access in authentication deployments?

Prevent secret leakage and unauthorized access in authentication deployments by applying structured secret management configurations. This ensures secure handling of sensitive credentials and protects against unauthorized access across your web application.