Installation
Go module
go get github.com/izetmolla/goauth
Import only the providers you need — each lives in its own subpackage:
import (
"github.com/izetmolla/goauth"
"github.com/izetmolla/goauth/providers/github"
"github.com/izetmolla/goauth/adapters/postgres"
)
Requirements
- Go 1.22+ (module uses modern standard library APIs).
- A secret of at least 32 bytes for JWE encryption and CSRF signing.
- For database sessions, email, OTP, MFA, or passkeys: an adapter implementing the relevant interfaces.
Optional integrations
| Package | When to use |
|---|---|
goauth/adapters/postgres | PostgreSQL persistence |
goauth/adapters/mysql | MySQL / MariaDB |
goauth/adapters/memory | Tests and prototypes |
github.com/izetmolla/fiberauth | Fiber v3 apps |
client/goauth.js | Browser token + popup callback helper |
Documentation site (this repo)
From the docs/ folder:
cd docs
pnpm install
pnpm start
Open http://localhost:3000 for this documentation.
pnpm build # production static site in docs/build/
:::info Package manager
The docs site uses pnpm. Use pnpm install instead of npm install in docs/.
:::