What problem does it solve?
This Skill enables self-hosted authentication for TypeScript projects running on Cloudflare Workers, providing a comprehensive plugin ecosystem to support OAuth, 2FA, SSO, organizations, and RBAC without relying on external hosted auth services.
Core Features & Use Cases
- OAuth 2.1 Provider: Build your own OAuth provider with PKCE, consent flows, and JWT or opaque tokens.
- SSO & RBAC: Enterprise Single Sign-On with SSO and role-based access control for multi-tenant apps.
- Organizations & Admin: Multi-tenant organization management and admin controls with auditing and security hooks.
- Flexible sessions: Stateless cookies or server-side sessions with KV or D1 storage, plus rate limiting.
- Use Case: Deploy a SaaS app that requires self-hosted auth, customer admins, and secure session management.
Quick Start
Install dependencies and configure D1 with Drizzle or Kysely, set BETTER_AUTH_SECRET and BETTER_AUTH_URL, then run the development server and call /api/auth endpoints to sign in or sign up.