- Home
- Skills
- Mamba Mental
- Agent Skill Manager
- Better Auth
better-auth_skill
- Python
2
GitHub Stars
1
Bundled Files
2 months ago
Catalog Refreshed
4 months ago
First Indexed
Readme & install
Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.
Installation
Preview and clipboard use veilstrat where the catalogue uses aiagentskills.
npx veilstrat add skill mamba-mental/agent-skill-manager --skill better-auth- SKILL.md7.2 KB
Overview
This skill implements authentication and authorization using Better Auth, a framework-agnostic TypeScript authentication framework. It provides email/password, social OAuth, two-factor (TOTP/SMS), passkeys/WebAuthn, session management, RBAC, rate limiting, and database adapter support. Use it to add a complete, extensible auth stack to web apps with standardized flows and plugin-based advanced features.
How this skill works
The skill generates a server-side auth instance that handles user lifecycle, verification, session tokens, and rate limiting, plus a client library for frontend hooks and API calls. It exposes configurable modules for email/password, social providers, 2FA, passkeys, magic links, and organizational features. Database adapters and schema generation tools integrate migrations and store identities, sessions, and roles.
When to use it
- Adding authentication to TypeScript/JavaScript web apps
- Implementing OAuth sign-in (Google, GitHub, Discord, etc.)
- Setting up two-factor authentication or passkeys for stronger security
- Managing sessions, RBAC, and multi-tenant organizations
- Protecting APIs and rate-limiting auth endpoints
Best practices
- Set BETTER_AUTH_SECRET and BETTER_AUTH_URL in environment variables before deployment
- Run schema generation and migrations after enabling plugins that add tables
- Enable email verification and password reset flows for production apps
- Use rate limiting on auth endpoints and monitor sign-in attempts
- Combine multiple auth methods (email, OAuth, passkeys) to support varied user preferences
Example use cases
- Standard web app: email/password sign-up, verification, and session management
- SaaS multi-tenant app: organizations plugin with role-based access control
- Security-first product: enable TOTP and WebAuthn passkeys for MFA
- Mobile+web: OAuth social login for quick onboarding and sessions for API access
- Progressive enhancement: start with email login then add magic links and passkeys
FAQ
Better Auth is framework-agnostic and includes adapters/handlers for Next.js, Nuxt, SvelteKit, Remix, Astro, Hono, Express, and others.
Do I need plugins for 2FA or passkeys?
Yes. Basic email/password and OAuth are built-in; advanced features like two-factor, passkeys, magic links, and organizations require enabling the respective plugins.