Skip to content
GoAuth.

Open source. Native Go. Yours.

Your app.
Your auth.
Your rules.

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/goauth
At home in your stack
net/httpGinChiFiber
Meet the adapters

01 / Compose your auth

A little core.
A lot of possibilities.

Start with the essentials. Add the pieces your product needs. Every module works with the same configuration, storage, and event system.

Core authenticationSignup, profiles, passwords, verificationIncluded
01 Choose your auth strategy
02 Add what your app needs
Explore all modules
main.goConfiguration excerpt
// 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()
Use your app, provider, and relying-party configuration.Full setup & imports
Stateless JWT with 2 optional modules selected. Code example updated.
A library you import. Infrastructure you control.See how it fits together

02 / Made for your codebase

Keep the control.
Skip the groundwork.

Explore the architecture
01

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 core
02

Your infrastructure fits.

Use the built-in GORM storage, or implement an interface for your own database. Bring your email, SMS, logging, and event providers along.

Bring your storage
03

Room for your logic.

Hook into the moments that matter. Intercept signups, enrich token claims, and send notifications with ordered handlers and async events.

Make it your own

Your next import starts here

Build something
worth signing in to.