better-auth

Implement authentication and authorization for web applications with Better Auth.

24|3|Updated Jan 30, 2026
One-click install
npx skills add https://github.com/VoDaiLocz/kilo-kit-mcp --skill better-auth-vodailocz
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: better-auth
Source: https://github.com/VoDaiLocz/kilo-kit-mcp/tree/main/skills/engineering/better-auth
Command: npx skills add https://github.com/VoDaiLocz/kilo-kit-mcp --skill better-auth-vodailocz

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires better-auth, express, sqlite3, and includes scripts (resource) and references (resource) and assets (resource) components.

What problem does it solve?

This Skill simplifies the process of adding secure authentication and authorization to web applications using the Better Auth framework.

Core Features & Use Cases

  • Email/Password Authentication: Supports email/password authentication with verification and password reset functionality.
  • OAuth Providers: Integrates with popular OAuth providers like GitHub, Google, Discord, etc.
  • Two-Factor Authentication: Offers two-factor authentication via TOTP and SMS.
  • Passkeys: Supports passwordless authentication using WebAuthn passkeys.
  • Session Management: Handles user session management with role-based access control and rate limiting.
  • Use Case: Use this Skill to add authentication to a web application, implement OAuth flows, set up two-factor authentication, manage user sessions, or configure authorization rules.

Quick Start

Use the better-auth skill to add authentication to your application. First, install the skill:

npm install better-auth

Then, configure the auth server and database:

import { betterAuth } from "better-auth";
export const auth = betterAuth({
  // Configure database, email, OAuth providers, etc.
});

Frequently Asked Questions about better-auth

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

FAQPage Schema
How do I add OAuth and email/password authentication to an Express app?

To add authentication to an Express app, configure the Better Auth library in TypeScript to support email/password verification and OAuth provider integrations like GitHub or Google. It uses sqlite3 to manage user data.

What is the best way to implement two-factor authentication and passkeys in a web application?

Implementing two-factor authentication and passkeys requires configuring Better Auth in your web application to support TOTP, SMS verification, and passwordless WebAuthn login. This provides secure access control for users.

How does session management with role-based access control work in Node.js?

Session management with role-based access control in Node.js works by configuring Better Auth to handle user sessions and enforce authorization rules. The library includes built-in rate limiting to secure session endpoints.

Can I use Better Auth with SQLite for user authentication?

Yes, you can use Better Auth with SQLite for user authentication by installing the sqlite3 dependency alongside Express. This setup allows your Node.js application to securely store credentials and manage sessions.

What are the prerequisites for setting up authentication in a Node.js web application?

The prerequisites for setting up authentication in a Node.js web application include having a Node.js environment with TypeScript configured. You must also install the better-auth, express, and sqlite3 libraries to handle the server and database.

Does Better Auth support passwordless login using WebAuthn?

Yes, Better Auth supports passwordless login using WebAuthn passkeys. This allows your web application users to authenticate securely without entering a password, alongside standard OAuth and email verification flows.