-
Notifications
You must be signed in to change notification settings - Fork 0
Home
dnahilman edited this page Jun 16, 2026
·
4 revisions
Goten — Go Language Otentikasi — is a composable, modular authentication library for Go with a multi-module plugin architecture. Install only what you need, no unused code in your binary.
Inspired by better-auth, Limen, and Go-better-auth.
Status: v0.2.0 — early release, API may change before v1.0.
-
Quick Start — install Goten, spin up Postgres, run migrations, and exercise the full sign-up / sign-in / protected-route flow end-to-end with
curl.
-
Goten with Gin — mount Goten under the Gin HTTP framework using
gin.WrapH, with a small Gin-idiomatic middleware adapter for protected routes. -
React + TypeScript client — a typed
fetchclient +useSessionhook for the cookie-based session, including cross-origin dev notes.
The README in the main repository is the source of truth for reference documentation:
- Endpoints table — every HTTP route shipped by core (plus the OAuth plugin routes).
-
CLI —
goten generateemits ORM models from core + active plugins; you apply them withdb.AutoMigrate. - Plugins — Username plugin, OAuth (Sign in with Google), and how to build your own.
- Architecture — the multi-module layout.
-
ID & Token Format —
g10_prefix conventions. - CSRF Protection — origin-check rules and how to harden for production.
-
examples/basic/— runnable HTTP server with Postgres via Docker Compose, demonstrating both the core email flow and the username plugin. This is what the Quick Start guide drives. -
examples/layered-gin/— Gin + GORM with a layeredhandler → service → repositoryarchitecture. -
examples/oauth-google/— Sign in with Google via the OAuth plugin (PKCE + OIDC), including Google Cloud Console setup.
- CONTRIBUTING.md — development setup, test/lint expectations.
- SECURITY.md — reporting vulnerabilities and supported versions.
- CHANGELOG.md — release notes.