Authboss is a Go package set you enable module by module to add login, registration, OAuth, 2FA, and related web auth flows.
Overview
Authboss is a modular authentication system for web applications written in Go. You turn on only the modules you need and wire them through a central Config object rather than adopting a single rigid stack.
Optional modules cover password auth, email confirmation, session expiry, account lockout, logout, OAuth1 and OAuth2 login, password recovery, registration, remember-me cookies, one-time passwords, and several two-factor options including TOTP and SMS. Two-factor packages are enabled explicitly rather than by side-effect import.
Integration expects you to supply storage for users and sessions, HTTP stack adapters for routing, responses, redirects, views, and mail, plus your own User and request body types that modules can upgrade with extra interfaces as needed. Defaults exist for several core pieces, but view and mail rendering are typically custom.
Authboss does not provide CSRF protection or request throttling; you add middleware for those. It is designed to work with or without a larger web framework once LoadClientStateMiddleware is in place for sessions and cookies.
Key features
- Pluggable auth modules
- Password and OAuth2 login
- Registration and email confirm
- Password recovery email flow
- Remember-me sessions
- Account lockout module
- TOTP and SMS two-factor
- Configurable paths and mail
Use cases
- Go web app user login
- OAuth2 sign-in integration
- Email verification gate
- 2FA for existing Go sites