GoTrue is a user management and authentication server written in Go that powers Supabase‘s features such as:
- Issuing JWTs
- Row Level Security with PostgREST
- User management
- Sign in with email, password, magic link, phone number
- Sign in with external providers (Google, Apple, Facebook, Discord, …)
.env file to store your own custom env vars. See
- Start the local postgres database in a postgres container:
docker-compose -f docker-compose-dev.yml up postgres
- Build the gotrue binary:
make build. You should see an output like this:
go build -ldflags "-X github.com/supabase/gotrue/cmd.Version=`git rev-parse HEAD`" GOOS=linux GOARCH=arm64 go build -ldflags "-X github.com/supabase/gotrue/cmd.Version=`git rev-parse HEAD`" -o gotrue-arm64
- Execute the gotrue binary:
.env.docker file to store your own custom env vars. See
docker psshould show 2 docker containers (
- That’s it! Visit the health checkendpoint to confirm that gotrue is running.
Running an authentication server in production is not an easy feat. We recommend using Supabase Auth which gets regular security updates.
GoTrue uses the Semantic Versioning scheme. Here are some further clarifications on backward compatibility guarantees:
Go API compatibility
GoTrue is not meant to be used as a Go library. There are no guarantees on backward API compatibility when used this way regardless which version number changes.
Changes to the patch version guarantees backward compatibility with:
- Database objects (tables, columns, indexes, functions).
- REST API
- JWT structure