better-auth-best-practices

Integrate Better Auth TypeScript authentication with sessions, OAuth, and passkeys.

Updated Oct 20, 2025
One-click install
npx skills add https://github.com/pierregueroult/dot-files --skill better-auth-best-practices-pierregueroult
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: better-auth-best-practices
Source: https://github.com/pierregueroult/dot-files/tree/main/opencode/skills/better-auth-best-practices
Command: npx skills add https://github.com/pierregueroult/dot-files --skill better-auth-best-practices-pierregueroult

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides comprehensive guidance and best practices for integrating Better Auth, a powerful TypeScript authentication framework, into your applications.

Core Features & Use Cases

  • Multi-Factor Authentication: Supports email/password, OAuth, magic links, and passkeys.
  • Flexible Configuration: Adaptable to various database backends (SQL, NoSQL) and session management strategies.
  • Use Case: Securely implement user sign-up, sign-in, and session management for a new web application using Better Auth's comprehensive plugin system.

Quick Start

Configure Better Auth by setting the BETTER_AUTH_SECRET and BETTER_AUTH_URL environment variables.

Frequently Asked Questions about better-auth-best-practices

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

FAQPage Schema
How do I integrate Better Auth for TypeScript authentication in my web application?

Integrate Better Auth by configuring environment variables like BETTER_AUTH_SECRET, selecting database adapters, and using its plugin system to enable secure user sign-up, sign-in, and session management.

Does Better Auth support passkeys and OAuth for multi-factor authentication?

Yes, Better Auth supports multi-factor authentication including email/password, OAuth, magic links, and passkeys to facilitate secure user authentication across various methods.

Can I use Better Auth with NoSQL and SQL database backends for session management?

Better Auth offers flexible configuration that adapts to various SQL and NoSQL database backends, allowing you to implement customized session management strategies for your application.

What is the best way to configure email flows and security hooks in a TypeScript auth framework?

Configure email flows and security hooks by leveraging Better Auth's comprehensive plugin system, which provides adaptable settings for secure user authentication and event-driven logic.

Do I need specific environment variables to start implementing secure authentication with Better Auth?

You need to set the BETTER_AUTH_SECRET and BETTER_AUTH_URL environment variables to quickly start configuring Better Auth for robust authentication in your application.