Supabase 8.1.0
dotnet add package Supabase --version 8.1.0
NuGet\Install-Package Supabase -Version 8.1.0
<PackageReference Include="Supabase" Version="8.1.0" />
<PackageVersion Include="Supabase" Version="8.1.0" />
<PackageReference Include="Supabase" />
paket add Supabase --version 8.1.0
#r "nuget: Supabase, 8.1.0"
#:package Supabase@8.1.0
#addin nuget:?package=Supabase&version=8.1.0
#tool nuget:?package=Supabase&version=8.1.0
Supabase
The unified C# client for Supabase. One client composes Auth, Database, Storage, Realtime, and Edge Functions, so you configure your project once and reach every service from a single object.
Part of the Supabase C# SDK. To use a single service on its own, reference its package instead — see Individual services.
Installation
dotnet add package Supabase
Targets .NET Standard 2.1, so it runs on .NET Core / .NET 5+, Xamarin, MAUI, and Unity. See the wiki for platform-specific guides.
Getting started
Create a project in the Supabase dashboard and grab your project URL and
API key from Settings → API — a publishable key (sb_publishable_…) for client-side use, or the
legacy public (anon) key. Then initialize the client:
using Supabase;
var url = Environment.GetEnvironmentVariable("SUPABASE_URL");
var key = Environment.GetEnvironmentVariable("SUPABASE_KEY");
var options = new SupabaseOptions
{
AutoRefreshToken = true,
AutoConnectRealtime = true
};
var supabase = new Client(url, key, options);
await supabase.InitializeAsync();
InitializeAsync() wires up the child clients and, if a session has been persisted, restores and
refreshes it. Once it returns, reach each service from the client:
// Auth
var session = await supabase.Auth.SignIn("user@example.com", "password");
// Database (models derive from BaseModel — see the Postgrest package)
var response = await supabase.From<Movie>().Get();
var movies = response.Models;
// Call a Postgres function
await supabase.Rpc("some_rpc", new { some_arg = "value" });
// Storage
await supabase.Storage.From("avatars").Upload("./local.png", "me.png");
// Realtime
var channel = supabase.Realtime.Channel("movies");
await channel.Subscribe();
// Edge Functions
await supabase.Functions.Invoke("hello-world");
Configuration
Pass a SupabaseOptions to the constructor:
| Option | Default | Purpose |
|---|---|---|
AutoRefreshToken |
true |
Refresh the user's access token in the background before it expires. |
AutoConnectRealtime |
false |
Connect the Realtime socket during InitializeAsync(). |
SessionHandler |
no-op | Persist, restore, and destroy the auth session (see below). |
Schema |
"public" |
Postgres schema used by Database and Realtime. |
Headers |
empty | Extra headers forwarded to every child client. |
StorageClientOptions |
defaults | Options passed through to the Storage client. |
Session persistence
By default the client does not persist the auth session, so the user is signed out when the process
ends. Provide a SessionHandler to save, load, and destroy the session — for example to a file or to
the platform's secure storage. See
Authorization with Gotrue
in the wiki for a worked example.
A note on keys: some APIs (user administration, bypassing RLS, etc.) require an elevated key rather than the public/publishable one. Never expose an elevated key in client-side code, and use a separate client instance for service and user contexts.
New API keys (publishable / secret)
Supabase is replacing the legacy JWT-based anon and service_role keys with opaque keys, deprecating
the legacy keys by the end of 2026. The SDK supports both:
| Key | Prefix | Use in |
|---|---|---|
| Publishable | sb_publishable_… |
Client-side apps, CLIs, scripts — replaces the anon key. |
| Secret | sb_secret_… |
Server-side only (bypasses RLS) — replaces the service_role key. Never ship it in client code. |
Pass either as the key argument; no other code changes are required. Because the new keys are not
JWTs, they must travel on the apikey header only — the SDK detects the sb_publishable_ / sb_secret_
prefixes and, on the Edge Functions path, stops sending the key as an Authorization: Bearer token when
there is no user session (the Functions gateway would otherwise reject it as an invalid JWT). Legacy JWT
keys are unaffected. See the Supabase guide on
migrating to the new API keys.
Observability (OpenTelemetry)
The clients emit traces and metrics through System.Diagnostics, so you can wire them into
OpenTelemetry (or any ActivityListener / MeterListener) without taking a dependency on the
OpenTelemetry packages. Emission is zero-cost while nothing is listening, so it is always on and stays
silent until you subscribe.
Register every instrumented source at once with SupabaseDiagnostics.SourceNames — each client
shares one name between its ActivitySource and its Meter, so the same list works for tracing and
metrics:
using OpenTelemetry.Metrics;
using OpenTelemetry.Trace;
using Supabase;
// Requires OpenTelemetry.Extensions.Hosting and an exporter package (e.g. OTLP) in your app.
builder.Services.AddOpenTelemetry()
.WithTracing(tracing => tracing
.AddSource(SupabaseDiagnostics.SourceNames.ToArray())
.AddOtlpExporter())
.WithMetrics(metrics => metrics
.AddMeter(SupabaseDiagnostics.SourceNames.ToArray())
.AddOtlpExporter());
This covers the Auth, Postgrest, Functions, and Storage clients. Realtime is not yet instrumented, so no websocket telemetry is emitted. URLs are recorded without their query string, and no token, credential, or payload is placed in a tag. Each service package's README documents the specific spans and metrics it produces.
Individual services
Each service is also published as a standalone package, useful when you only need one:
| Service | Package | Docs |
|---|---|---|
| Auth | Supabase.Gotrue |
README |
| Database | Supabase.Postgrest |
README |
| Storage | Supabase.Storage |
README |
| Realtime | Supabase.Realtime |
README |
| Functions | Supabase.Functions |
README |
Documentation
Contributing
Contributions are welcome. See the repository root for how to build and test the SDK.
License
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Core | netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.1 is compatible. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.1
- Supabase.Core (>= 8.1.0)
- Supabase.Functions (>= 8.1.0)
- Supabase.Gotrue (>= 8.1.0)
- Supabase.Postgrest (>= 8.1.0)
- Supabase.Realtime (>= 8.1.0)
- Supabase.Storage (>= 8.1.0)
NuGet packages (14)
Showing the top 5 NuGet packages that depend on Supabase:
| Package | Downloads |
|---|---|
|
AIC.Core.Data.Supabase
Shared .NET library for Aerospace, Intelligence, and Cyber solutions. |
|
|
Ivy.Auth.Supabase
Build Internal Applications with AI and Pure C# |
|
|
Hazina.Store.EmbeddingStore
Vector embedding storage for semantic search in Hazina. Provides IEmbeddingStore interface with PostgreSQL/pgvector backend, batch operations, similarity matching, and embedding generation service. Essential for RAG implementations. |
|
|
Hazina.Store.DocumentStore
Document storage and retrieval system for RAG (Retrieval-Augmented Generation) in Hazina. Provides IDocumentStore interface with support for text/binary documents, chunking, metadata management, and relevancy matching. Includes file-based and memory-based backends. |
|
|
NWERP.Infrastructure
Package Description |
GitHub repositories (3)
Showing the top 3 popular GitHub repositories that depend on Supabase:
| Repository | Stars |
|---|---|
|
yoshiask/FluentStore
A unifying frontend for Windows app stores and package managers
|
|
|
h4lfheart/FortnitePorting
The quickest and most efficient way to extract assets from Fortnite
|
|
|
Ivy-Interactive/Ivy-Framework
The ultimate framework for building internal tools with LLM code generation by unifying front-end and back-end into a single C# codebase.
|
| Version | Downloads | Last Updated |
|---|---|---|
| 8.1.0 | 0 | 9/7/2026 |
| 8.0.0 | 227 | 9/3/2026 |
| 1.6.2 | 2,041 | 8/28/2026 |
| 1.6.0 | 6,701 | 8/7/2026 |
| 1.5.0 | 2,838 | 7/30/2026 |
| 1.4.0 | 4,769 | 7/23/2026 |
| 1.3.0 | 1,102 | 7/20/2026 |
| 1.2.0 | 2,918 | 7/16/2026 |
| 1.1.1 | 679,036 | 7/27/2024 |
| 1.1.0 | 3,177 | 7/25/2024 |
| 1.0.5 | 22,486 | 6/29/2024 |
| 1.0.4 | 15,780 | 6/11/2024 |
| 1.0.3 | 5,313 | 5/22/2024 |
| 1.0.2 | 9,661 | 5/16/2024 |
| 1.0.1 | 3,959 | 5/7/2024 |
| 1.0.0 | 18,533 | 4/21/2024 |