Skip to content

About

A Go client SDK for Supabase. Incubating, currently in public Alpha.

Resources

Code of conduct

Contributing

Security policy

Stars

16 stars

Watchers

0 watching

Forks

Latest commit

 

History

818 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Supabase Go SDK

The official Supabase SDK for Go. This is a multi-module monorepo, currently in early pre-release development.

Caution

Status: Alpha. Modules are tagged for use, and their public surfaces may change in breaking ways between releases until v1.0.0.

Modules

Module Purpose
github.com/supabase/supabase-go Convenience root client composing the domains, at the repository root
github.com/supabase/supabase-go/core Shared configuration, functional options and the HTTP pipeline
github.com/supabase/supabase-go/auth Auth client for server-side JWT verification and project administration
github.com/supabase/supabase-go/postgrest Database (PostgREST) client

Quick start

Add the SDK to your module:

go get github.com/supabase/supabase-go

Construct a client with your project URL and API key:

client, err := supabase.New("https://PROJECT_ID.supabase.co", "sb_publishable_...")

Two walkthroughs build complete Go APIs against a local Supabase stack:

  • The RLS Walkthrough verifies each user's access token, then serves only that user's rows under Row Level Security.
  • The Premium Access Walkthrough checks each user with Auth on every request, so a plan change or a sign-out takes effect straight away. It uses the auth module on its own.

The package documentation on pkg.go.dev covers the rest of the API and lists the other modules.

Supported Go versions

We support the two most recent major versions of Go, aligning with the Go project's Release Policy.

The oldest Go version we support is referred to as our "consumer floor" and can be found in each module's go directive (see go.mod files, for example auth/go.mod), raised opportunistically per-module after each new Go release.

Supabase Service Compatibility

The Supabase Go SDK only guarantees compatibility with the latest release of each Supabase service, unless a minimum supported version is explicitly listed below.

Older service releases are supported on a best-effort basis, but compatibility is not guaranteed.

If you self-host Supabase, we recommend upgrading your services to their latest releases when upgrading the SDK.

Service Module Server releases Lowest supported version
Auth auth supabase/auth Latest release
PostgREST postgrest PostgREST/postgrest Latest release

Security

This SDK is built for backend processes that hold privileged credentials, with its security posture enforced by design:

  • Zero external runtime dependencies: the published modules require only each other, so consumers inherit no third-party code from us.
  • Vulnerability scanning is continuous and scheduled: on every push and pull request and daily on a schedule, govulncheck checks what the SDK's code can reach, and OSV-Scanner checks every dependency the repository declares, its tooling included.
  • Credentials never enter logs: silent by default, and an injected logger gets one debug record per request round trip - bodies, query strings and header values are never logged.
  • Project API keys live only in memory: the client holds its API key for its lifetime and never persists it.
  • Session tokens are persisted only when your program asks: a signed-in user's session holds its tokens in memory until your program hands it a SessionStore, and from then on writes them to that store, which should treat them as a secret.
  • No Cgo: pure Go throughout, with no memory-unsafe boundary of our own.
  • Token verification is local-first: the auth module verifies end-user JWTs against the project's published signing keys, deferring to the Auth server only for tokens the key set cannot verify.

To report a vulnerability, see our organization-wide security policy.

Contributing and development

This SDK is in pre-release and is not yet accepting external code contributions (see DEVELOPMENT.md).

Also see standard.md for our definition of "what good looks like" for a Go SDK.

License

This SDK is licensed under the MIT License - see LICENSE.

About

A Go client SDK for Supabase. Incubating, currently in public Alpha.

Resources

Code of conduct

Contributing

Security policy

Stars

16 stars

Watchers

0 watching

Forks

Releases

Used by

Contributors

Languages