Interface IPowerSyncBackendConnector
- Namespace
- PowerSync.Common.Client.Connection
- Assembly
- PowerSync.Common.dll
public interface IPowerSyncBackendConnector
Methods
- FetchCredentials()
Allows the PowerSync client to retrieve an authentication token from your backend which is used to authenticate against the PowerSync service.
This should always fetch a fresh set of credentials - don't use cached values.
Return null if the user is not signed in. Throw an error if credentials cannot be fetched due to a network error or other temporary error.
This token is kept for the duration of a sync connection.
- UploadData(IPowerSyncDatabase)
Upload local changes to the app backend.
Use GetCrudBatch(int) to get a batch of changes to upload.
Any thrown errors will result in a retry after the configured wait period (default: 5 seconds).