Skip to main content

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

PackageWhen to use
goauth/adapters/postgresPostgreSQL persistence
goauth/adapters/mysqlMySQL / MariaDB
goauth/adapters/memoryTests and prototypes
github.com/izetmolla/fiberauthFiber v3 apps
client/goauth.jsBrowser 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/. :::