better-auth

Implement framework-agnostic TypeScript authentication with email/password, OAuth, 2FA, passkeys, sessions, and RBAC.

4|20|Updated Sep 27, 2025
One-click install
npx skills add https://github.com/tan-yong-sheng/cloudflare-image-mcp --skill better-auth-tan-yong-sheng
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: better-auth
Source: https://github.com/tan-yong-sheng/cloudflare-image-mcp/tree/main/.claude/skills/better-auth
Command: npx skills add https://github.com/tan-yong-sheng/cloudflare-image-mcp --skill better-auth-tan-yong-sheng

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) and scripts (resource) components.

What problem does it solve?

This Skill provides a comprehensive, framework-agnostic authentication and authorization solution for TypeScript applications, simplifying the complex task of securing user access.

Core Features & Use Cases

  • Multi-Method Authentication: Supports email/password, OAuth (Google, GitHub, etc.), 2FA, and passkeys.
  • Session Management & RBAC: Handles user sessions and role-based access control.
  • Use Case: You are building a new web application and need to implement secure user sign-up, login, and manage user permissions across different roles. This Skill provides all the necessary building blocks.

Quick Start

Use the better-auth skill to set up email/password authentication with GitHub OAuth.

Frequently Asked Questions about better-auth

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

FAQPage Schema
How do I implement authentication and authorization in a TypeScript web application?

You can implement authentication and authorization in a TypeScript web application using a framework-agnostic solution that handles email/password, OAuth, 2FA, passkeys, session management, and RBAC. This approach provides all necessary building blocks for secure user access.

How does 2FA and OAuth session management work for TypeScript apps?

2FA and OAuth session management work by integrating OAuth providers like GitHub and Google, generating secure sessions, and enforcing role-based access control. This framework-agnostic mechanism handles user data persistence via database integration.

Can I use framework-agnostic authentication with any TypeScript database setup?

Yes, you can use framework-agnostic authentication with any TypeScript database setup, but it requires database integration for user data persistence and secure secret management to function correctly across your web application.

What is the best way to add email/password and GitHub OAuth to a new web app?

The best way to add email/password and GitHub OAuth is using a TypeScript authentication framework that supports multi-method authentication. This simplifies setting up secure user sign-up and login workflows.

Do I need secure secret management for role-based access control in TypeScript?

Yes, you need secure secret management for role-based access control in TypeScript. RBAC, session management, and multi-method authentication all require secure secret management and database integration to maintain user permissions safely.

What are the limitations of framework-agnostic TypeScript authentication?

Limitations of framework-agnostic TypeScript authentication include the strict requirement for external database integration for user data persistence and secure secret management, which must be configured before implementing features like passkeys and RBAC.