API reference / @evolu/common / local-first / OwnerWebSocketTransport

Interface: OwnerWebSocketTransport

Defined in: packages/common/src/local-first/Owner.ts:330

WebSocket transport configuration.

Authentication via URL

The OwnerId is passed as a URL query parameter. While this approach is generally discouraged for authentication tokens (they get logged), it's safe here because OwnerId is pseudonymous and used only for access verification - it provides no ability to read encrypted data or write changes.

See: HTTP headers in Websockets client API

Error Handling

When a relay rejects a connection (invalid OwnerId, unauthorized owner, or server error), the browser WebSocket API does not expose the specific HTTP status code or reason - it only reports a generic connection failure. The client automatically retries with exponential backoff and jitter, eventually succeeding once the configuration or server issue is resolved.

Legitimate clients will be properly configured with valid credentials, so automatic retry is OK.

See

Properties

PropertyModifierTypeDefined in
typereadonly"WebSocket"packages/common/src/local-first/Owner.ts:331
urlreadonlystringpackages/common/src/local-first/Owner.ts:332

Was this page helpful?