Electric SQL Auth Proxy
The Activation API provides an authenticated proxy for Electric SQL that enables secure, multi-tenant data access from external client applications.Overview
Instead of clients connecting directly to Electric SQL, they connect through the Activation API which:- Authenticates requests via OAuth 2.0 or API keys
- Filters data automatically by customer_id for multi-tenant isolation
- Proxies requests to the Electric SQL backend
- Streams responses back to the client
Benefits
- ✅ External UI code - Dashboards/clients don’t need to be in this repo
- ✅ Data isolation - Clients only see their own customer’s data
- ✅ Standard auth - OAuth 2.0 and API key support
- ✅ Centralized security - All auth/authz in one place
- ✅ Real-time updates - Full Electric SQL streaming support
API Endpoint
Authentication
OAuth 2.0:Query Parameters
All Electric SQL query parameters are supported:table
(required) - The table nameoffset
(optional) - Pagination offset (use-1
for latest)where
(optional) - Additional WHERE clausescolumns
(optional) - Column selectionlimit
(optional) - Result limit
Automatic Customer Filtering
The proxy automatically adds customer_id filtering to all requests:Client Example
JavaScript/TypeScript
React Hook
Security
Customer Isolation
Every request is automatically filtered by the authenticated user’s customer_id:Authentication Required
All requests must include either:Authorization: Bearer ${TOKEN}
(OAuth 2.0)x-scope3-api-key: ${API_KEY}
(API key)
Cache Headers
Responses includeVary: Authorization
to ensure proper caching per-customer.