Skip to content

GoBetterAuth/go-better-auth

Project Logo

A comprehensive, framework-agnostic authentication and authorization library for Go.


Table of Contents

  1. Introduction
  2. Features
  3. Docs
  4. Contributing

Introduction

✨ Overview

GoBetterAuth is a comprehensive, authentication and authorization library/framework for Go applications. It provides secure email/password authentication, session management, email verification, password reset, and more, all built with clean architecture.

💭 Why GoBetterAuth?

GoBetterAuth is designed to be a comprehensive authentication and authorization solution for Go applications. It simplifies the implementation of common security features while providing a clean and modular architecture. This way developers can focus on building their applications without worrying about the complexities of authentication and the time it takes to implement these features.


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.
  • 🛡️ Enhanced Security – CSRF protection.
  • Rate Limiting – Configurable rate limiting with secondary storage.
  • 📨 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.

Docs

For more info and a full guide on how to use this library, check out the Docs.


Contributing

Your contributions are welcome! Here's how you can get involved:


Support & Community


About

A comprehensive, framework-agnostic authentication and authorization library for Go.

Topics

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Sponsor this project

Packages

No packages published

Languages