AuthInGo
Build secure Go authentication with opaque cookie sessions, PostgreSQL storage, and a small React SDK.
AuthInGo
AuthInGo is a lightweight authentication framework for teams that want ownership of their auth stack without rebuilding every session, cookie, and route by hand.
It gives you a Go auth engine, a pluggable storage interface, a PostgreSQL adapter, and a headless React SDK for wiring login state into your UI.
Built around server-owned sessions
AuthInGo stores sessions in your database and sends opaque tokens through HttpOnly cookies. Your frontend never needs to read, decode, or persist tokens.
Get started
Install AuthInGo, mount the backend routes, and connect your first React app.
Core concepts
Understand users, sessions, cookies, middleware, and the Store interface.
Server API
Set up the Go engine and protect application routes.
React SDK
Use AuthProvider, useAuth, and createAuthClient in React or Next.js.
What AuthInGo provides
- Email and password sign up.
- Email and password sign in.
- HttpOnly session and refresh cookies.
- Database-backed opaque sessions.
- Route protection with
RequireAuth. - A storage adapter contract for your own database layer.
- A ready-to-use PostgreSQL adapter.
- A React provider and typed client helpers.
Package map
| Package | Purpose |
|---|---|
github.com/binit2-1/authingo | Go auth engine, HTTP routes, middleware, types, and Store interface. |
github.com/binit2-1/authingo/adapters/postgres | PostgreSQL implementation of the Store interface using database/sql. |
@authingo/react | React provider, auth state hook, and email/password auth client. |
Start here
New projects should begin with Installation, then read Server API and React SDK.