GoTrue is a small Go API for signup, login, JWT issuance, and custom user fields. It suits self-hosted auth in Jamstack-style stacks.
Overview
GoTrue is an open-source API service written in Go that handles user registration, authentication, and JWT token management for applications that call it over HTTP. It follows OAuth2-style token flows and can store custom user metadata alongside core account fields.
Configuration uses environment variables prefixed with GOTRUE, a .env file, or both, covering site URL, database connection, JWT signing, SMTP mail, external OAuth providers, and webhooks. It exposes REST endpoints for signup, invite, verify, recover, token exchange, user profile updates, logout, and public settings.
Optional integrations include Bitbucket, GitHub, GitLab, and Google as external login providers, plus email-driven confirmation and password recovery when SMTP is configured. Database migrations are run explicitly after building the binary or container image.
Operators typically deploy GoTrue as a network-facing microservice backed by MySQL, listening on a configurable host and port, rather than as a library imported into another binary.
Key features
- Email and password signup
- OAuth2 token endpoint
- JWT access and refresh tokens
- External GitHub and Google login
- SMTP invite and recovery mail
- User profile and metadata API
- Signed auth webhooks
- MySQL-backed user storage
Use cases
- Jamstack user authentication
- Self-hosted auth microservice
- JWT issuance for SPAs
- Social login via OAuth providers