✨ Framework-independent Authentication

Secure Auth

Made Simple for Go

A comprehensive, framework-independent authentication and authorization library that brings enterprise-grade security to your Go applications.

func main() { auth, _ := gobetterauth.New(&gobetterauthdomain.Config{ BaseURL: "http://localhost:8080", BasePath: "/api/auth", Database: gobetterauthdomain.DatabaseConfig{ Provider: "postgres", ConnectionString: os.Getenv("DATABASE_URL"), }, EmailAndPassword: &gobetterauthdomain.EmailPasswordConfig{ Enabled: true, // ...more options }, EmailVerification: &gobetterauthdomain.EmailVerificationConfig{ Enabled: true, SendOnSignUp: true, AutoSignInAfterVerification: true, // ...more options }, SocialProviders: &gobetterauthdomain.SocialProvidersConfig{ Google: &gobetterauthdomain.GoogleProviderConfig{ ClientID: os.Getenv("GOOGLE_CLIENT_ID"), ClientSecret: os.Getenv("GOOGLE_CLIENT_SECRET"), RedirectURI: "http://localhost:8080/auth/oauth/google/callback", }, // ...other providers }, }) }

Everything you need

Powerful Features

Everything you need for modern authentication and authorization

Framework Independent

Works seamlessly with any Go framework or as a standalone library

Secure by Default

Built with security best practices and industry standards

High Performance

Optimized for speed with minimal overhead and maximum efficiency

Developer Friendly

Clean API design with comprehensive documentation and examples

Solution

Complete Auth

All the things you need, built-in and ready to use

Email/Password authentication
OAuth 2.0 support
Session management
Password hashing & validation
Middleware support
CSRF protection
Rate limiting
Custom hooks into auth flows
Go

Open Source & Community Driven

Go Better Auth is fully open source and maintained by the community. Contribute, report issues, or star us on GitHub.

Released under the Apache 2.0 License