Welcome to GoBetterAuth
Intro to GoBetterAuth
GoBetterAuth is A comprehensive, framework-agnostic authentication and authorization library for Go, inspired by Better Auth.
Note: This project is still a work in progress. Contributions are most welcome!
โจ Features
- ๐ Email & Password Authentication โ Secure, production-ready authentication with argon2 password hashing
- ๐ Social OAuth Providers โ Google, GitHub, Discord, and extensible generic OAuth2 support
- ๐ Session Management โ Secure, customizable session handling with refresh and expiration controls
- โ๏ธ Email Verification โ Optional, configurable email verification workflow
- ๐ Password Reset โ Secure password reset with customizable email callbacks
- ๐๏ธ Clean Architecture โ Go Clean Architecture: domain, usecase, repository, handler, and infrastructure layers
- ๐ Plugin System โ Extensible plugin architecture for custom business logic and routes
- ๐พ Multiple Database Support โ SQLite and PostgreSQL adapters, with migration scripts included
- ๐ก๏ธ Security First โ CSRF protection, secure cookies, rate limiting, and input validation
- โก Rate Limiting โ Configurable, per-endpoint rate limiting with memory or database storage
- ๐ Token Refresh Flow โ Automatic token refresh and session extension
- ๐ฆ Minimal Dependencies โ Standard library first, production-ready, and framework-agnostic
- ๐งฉ Comprehensive Configuration โ Flexible, type-safe config with sensible defaults and environment variable support
- ๐งช Test Coverage โ Unit, integration, and E2E tests reflecting production scenarios
