better-auth

Implement self-hosted authentication with OAuth, 2FA, and passwordless options.

22|3|Updated Jan 10, 2026
One-click install
npx skills add https://github.com/fusengine/agents --skill better-auth-fusengine
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: better-auth
Source: https://github.com/fusengine/agents/tree/main/plugins/nextjs-expert/skills/better-auth
Command: npx skills add https://github.com/fusengine/agents --skill better-auth-fusengine

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill provides a comprehensive, self-hosted authentication solution for web applications, eliminating the need for third-party services and offering extensive customization.

Core Features & Use Cases

  • Full-Stack Authentication: Supports email/password, OAuth (40+ providers), 2FA, Passkeys, Magic Links, and more.
  • Extensible Plugin System: Add features like Organizations, SSO, SCIM, Stripe integration on demand.
  • Framework Agnostic: Integrates with Next.js, SvelteKit, Nuxt, Express, and many others.
  • Use Case: Implement secure user sign-up, login, and session management for a new SaaS product, including social logins and enterprise SSO.

Quick Start

Use the better-auth skill to set up a basic email/password authentication flow in your Next.js application.

Frequently Asked Questions about better-auth

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

FAQPage Schema
How do I implement self-hosted authentication with OAuth and 2FA in Next.js?

You can implement self-hosted authentication with OAuth and 2FA in Next.js by using this framework to establish secure user sign-up, login, and session management handlers. It provides dedicated client SDKs for seamless frontend integration.

What is the best way to add SSO and SCIM provisioning to a SaaS application?

The best way to add SSO and SCIM provisioning to a SaaS application is through an extensible plugin system that enables enterprise features on demand. This framework supports secure user management and identity provisioning without third-party services.

Does this self-hosted authentication framework work with SvelteKit or Express?

Yes, this self-hosted authentication framework works with SvelteKit, Express, Nuxt, and Next.js. It integrates seamlessly with various frontend and backend frameworks via dedicated handlers and client SDKs.

Can I use passkeys and magic links for passwordless login in a TypeScript web app?

Yes, you can use passkeys and magic links for passwordless login in a TypeScript web app. The framework supports diverse authentication methods including email/password, OAuth, 2FA, and passwordless options.

How does session handling work for self-hosted web application authentication?

Session handling for self-hosted web application authentication works by facilitating secure user management through dedicated handlers and client SDKs. It maintains secure session states across supported frameworks like Next.js and Express.

Are there limitations to self-hosting authentication instead of using a third-party service?

Self-hosting authentication instead of using a third-party service requires managing your own infrastructure, but eliminates external dependencies and offers extensive customization. This framework provides a robust solution supporting 40+ OAuth providers and enterprise features.