Sync server overview
The Barq sync server stores synced files and verifies client access tokens.
It is built from Barq Core.
Responsibilities
Section titled “Responsibilities”- listen for sync websocket clients
- verify JWT access tokens
- isolate tenants
- store synced database files
- enforce tenant limits
- support TLS
- support partition sync and flexible sync
Auth Boundary
Section titled “Auth Boundary”The server verifies tokens. It does not issue tokens.
Your app or auth service should sign access tokens. Clients pass those tokens to Barq.User.fromToken() or the native sync user API.
The server prints a route like:
ws://localhost:9090/barq-syncClients use that route when creating or configuring a sync user.
With TLS enabled, the route uses wss://.