How HN: Go-dev-auth zero-dependency authentication library for Go
Go-dev-auth is a zero-dependency authentication library for the Go programming language. It covers a wide range of features such as email & password, social sign-on, sessions, account linking, two-factor authentication, passkeys, magic links, organizations, single sign-on (SSO), admin tooling, and API keys with JSON Web Tokens (JWT). The library is designed to be framework-agnostic, meaning it can be integrated with various HTTP frameworks like chi, echo, gorilla, or gin.
Zero external dependencies make Go-dev-auth a robust and portable option for developers looking to implement authentication in their Go applications. The library follows Semantic Versioning (SemVer) with pre-1.0 versions still allowing changes to the public API between minor releases. From v1.0 onwards, breaking changes require a major version bump.
The library has been successfully used in production on PostgreSQL, and it supports various storage backends including SQLite, PostgreSQL, and MySQL. It follows a comprehensive threat model and includes features such as rate limiting, IP resolution, trusted proxy handling, and CORS protection. Go-dev-auth also supports plugins, allowing developers to add custom functionality as needed.
Written by urgent.news from Hacker News's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.