The essentials, handled.
Signup, login, password resets, email verification, and account lockout. Choose server-side sessions or stateless JWT with refresh token rotation.
Meet the coreOpen source. Native Go. Yours.
Authentication that belongs in your codebase. Add sessions, passkeys, OAuth, two-factor, and more with a modular Go library built around your application.
go get github.com/bete7512/goauth01 / Compose your auth
Start with the essentials. Add the pieces your product needs. Every module works with the same configuration, storage, and event system.
// 01. Create your instance
a, err := auth.New(cfg)
if err != nil {
log.Fatal(err)
}
// 02. Register your modules
for _, module := range []config.Component{
stateless.New(nil),
twofactor.New(),
oauth.New(oauthConfig),
} {
if err := a.Use(module); err != nil {
log.Fatal(err)
}
}
// 03. Ready your application
if err := a.Initialize(ctx); err != nil {
log.Fatal(err)
}
defer a.Close()
02 / Made for your codebase
Signup, login, password resets, email verification, and account lockout. Choose server-side sessions or stateless JWT with refresh token rotation.
Meet the coreUse the built-in GORM storage, or implement an interface for your own database. Bring your email, SMS, logging, and event providers along.
Bring your storageHook into the moments that matter. Intercept signups, enrich token claims, and send notifications with ordered handlers and async events.
Make it your ownYour next import starts here