Automatic Logout and Sync Loss in PowerSync with Supabase
Closed this issue · 2 comments
Hi team,
I encountered an issue with PowerSync where, after some time, it automatically log-out from Supabase credentials, resulting in a connection loss. This triggers the following error:
Data upload error
As a consequence, synchronisation between PowerSync and Supabase fails.
Could you please investigate this issue or suggest any potential solutions? Your assistance in resolving this would be greatly appreciated.
Thank you!
The PowerSync service should detect the invalid credentials and call the fetchCredentials
method of the PowerSyncBackendConnector
provided to the powersync.connect
method. The PowerSync SDK assumes the PowerSyncBackendConnector
will provide newly refreshed credentials.
I don't have specific examples of this, but you should be able to use the Supabase SDK to detect if the session has expired and trigger a re-authentication flow.
Closing this issue due to inactivity.