Welcome
Welcome to GoBetterAuth
GoBetterAuth is an open-source authentication solution that scales with you. Embed it as a library in your Go app, or run it as a standalone auth server for any language or framework.
✨ Features
- 🔑 Email & Password – Secure, production-ready authentication with argon2 password hashing. Includes Email Verification, Password Reset and Change Email flows.
- 🌐 Social OAuth Providers – Google, GitHub, Discord and more coming soon.
- 💾 Multiple Database Support – SQLite, PostgreSQL, MySQL adapters and more coming soon, with migration scripts included.
- 🗄️ Secondary Storage – Supports in-memory/database storage and a custom interface to implement Redis and other key-value stores. Use secondary storage to manage session data, rate limiting counters, and other high-frequency records. This enables offloading intensive data to high-performance storage solutions or RAM for optimal scalability and speed.
- 📦 Minimal Dependencies – Standard library first, production-ready, and framework-agnostic.
- 🧩 Comprehensive Configuration – Flexible, type-safe config with sensible defaults and environment variable support.
- ⚙️ Flexible Configuration – Whether you're embedding as a library or running as a server, GoBetterAuth gives you full control over your authentication logic.
- 🛡️ Enhanced Security – CSRF protection.
- ⚡ Rate Limiting – Configurable rate limiting with secondary storage.
- 🪝 Hooks System – Powerful hooks for deep customization: Endpoint Hooks allow you to modify requests and responses in the lifecycle. Database Hooks let you tap into DB events like BeforeCreate and AfterCreate on entities, with support for custom hooks in plugins. Event Hooks run after key actions, enabling event-driven workflows. Webhooks are also supported, so you can trigger external services when authentication events occur.
- 📨 Event Bus – Built-in event bus enables event-driven architecture, allowing you to publish and subscribe to authentication and authorization events for seamless integration with external systems and custom workflows.
- 🔌 Plugin System – Extensible plugin architecture for custom business logic and routes. Including flexible plugin interface to implement all kinds of plugins.
