better-auth

Implement authentication and authorization in TypeScript web apps with Better Auth.

Updated Mar 26, 2026
One-click install
npx skills add https://github.com/locdinh209/curation-skills --skill better-auth-locdinh209
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: better-auth
Source: https://github.com/locdinh209/curation-skills/tree/main/better-auth
Command: npx skills add https://github.com/locdinh209/curation-skills --skill better-auth-locdinh209

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires better-auth, mongoose, jsonwebtoken, bcrypt, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill helps developers quickly and securely implement authentication and authorization features into their web applications, streamlining the process and reducing the potential for security vulnerabilities.

Core Features & Use Cases

  • Authentication: Email/password, OAuth with various providers, and passkeys.
  • Authorization: Role-based access control and rate limiting.
  • Use Case: Build a user account system with login, registration, and password recovery, integrated with social platforms like GitHub and Google.

Quick Start

Run the following command to initialize the authentication system in your application:

npm install better-auth

Frequently Asked Questions about better-auth

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

FAQPage Schema
How do I implement role-based access control and two-factor authentication in a web application?▼

You can implement role-based access control and two-factor authentication using Better Auth, which manages sessions and OAuth providers to secure web applications. It requires TypeScript and various npm packages.

Does this authentication approach support passwordless login and OAuth providers like Google and GitHub?▼

Yes, this authentication approach supports passwordless login via passkeys and OAuth integration with providers like Google and GitHub. It handles email/password, two-factor authentication, and session management.

What dependencies do I need to set up session management and authorization?▼

You need TypeScript along with the better-auth, mongoose, jsonwebtoken, and bcrypt npm packages to set up session management and authorization. Initialize the system by running npm install better-auth.

What is the best way to add secure user account registration and password recovery?▼

Using Better Auth for authentication and authorization is the best way to add secure user account registration and password recovery. It streamlines implementation and reduces potential security vulnerabilities in web applications.

Can I use this role-based access control system with my existing TypeScript stack?▼

Yes, you can integrate this role-based access control system with your existing TypeScript stack. The implementation handles authentication, rate limiting, and session management using mongoose and jsonwebtoken dependencies.