Auth Patterns for Better-Auth

•
6
•

Implements secure authentication workflows using Better-Auth with standardized patterns for login, registration, and protected routes.

This skill provides Claude with specialized knowledge for integrating Better-Auth into web applications, specifically focusing on server-side frameworks. It enforces security best practices such as utilizing getRequestEvent for session handling, managing redirects correctly outside of error blocks, and implementing guarded queries to protect sensitive endpoints. By providing clear implementation patterns for email verification and registration flows, it ensures a robust and secure authentication layer that handles headers, cookies, and protected data access efficiently.

Key Features

01Correct handling of server-side redirects and cookie headers
02Best practices for session-aware server-side logic
03Secure route protection using guarded queries and commands
04Pre-configured email verification integration patterns
056 GitHub stars
06Standardized login and registration workflow patterns

Use Cases

01Implementing a multi-step registration flow with required email verification
02Adding email-based authentication to a new web application
03Protecting sensitive backend data with session-guarded queries