Method FetchCredentials
- Namespace
- PowerSync.Common.Client.Connection
- Assembly
- PowerSync.Common.dll
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.
Task<PowerSyncCredentials?> FetchCredentials()