File tree Expand file tree Collapse file tree 8 files changed +7
-11
lines changed
connectors/supabase/src/commonMain/kotlin/com/powersync/connector/supabase
commonIntegrationTest/kotlin/com/powersync/testutils
commonMain/kotlin/com/powersync
commonTest/kotlin/com/powersync Expand file tree Collapse file tree 8 files changed +7
-11
lines changed Original file line number Diff line number Diff line change 33## 1.0.0-BETA32
44
55* Added ` onChange ` method to the PowerSync client. This allows for observing table changes.
6+ * Removed unnecessary ` User-Id ` header from internal PowerSync service requests.
67* Fix loading native PowerSync extension for Java targets.
78
89## 1.0.0-BETA31
Original file line number Diff line number Diff line change @@ -47,9 +47,6 @@ Current limitations:
4747
4848- Integration with SQLDelight schema and API generation (ORM) is not yet supported.
4949
50- Future work/ideas:
51- - Attachments helper package.
52-
5350## Installation
5451
5552Add the PowerSync Kotlin Multiplatform SDK to your project by adding the following to your ` build.gradle.kts ` file:
Original file line number Diff line number Diff line change @@ -164,11 +164,9 @@ public class SupabaseConnector(
164164
165165 check(session.user != null ) { " No user data" }
166166
167- // userId is for debugging purposes only
168167 PowerSyncCredentials (
169168 endpoint = powerSyncEndpoint,
170169 token = session.accessToken, // Use the access token to authenticate against PowerSync
171- userId = session.user!! .id,
172170 )
173171 }
174172
Original file line number Diff line number Diff line change @@ -100,7 +100,6 @@ internal class ActiveDatabaseTest(
100100 everySuspend { getCredentialsCached() } returns
101101 PowerSyncCredentials (
102102 token = " test-token" ,
103- userId = " test-user" ,
104103 endpoint = " https://test.com" ,
105104 )
106105
Original file line number Diff line number Diff line change @@ -19,7 +19,12 @@ public data class PowerSyncCredentials(
1919 /* *
2020 * User ID.
2121 */
22- @SerialName(" user_id" ) val userId : String? ,
22+ @Deprecated(
23+ message = " This property is no longer used and should be removed." ,
24+ level = DeprecationLevel .WARNING ,
25+ )
26+ @SerialName(" user_id" )
27+ val userId : String? = null ,
2328) {
2429 override fun toString (): String = " PowerSyncCredentials<endpoint: $endpoint userId: $userId >"
2530
Original file line number Diff line number Diff line change @@ -174,7 +174,6 @@ internal class SyncStream(
174174 contentType(ContentType .Application .Json )
175175 headers {
176176 append(HttpHeaders .Authorization , " Token ${credentials.token} " )
177- append(" User-Id" , credentials.userId ? : " " )
178177 }
179178 }
180179 if (response.status.value == 401 ) {
@@ -202,7 +201,6 @@ internal class SyncStream(
202201 contentType(ContentType .Application .Json )
203202 headers {
204203 append(HttpHeaders .Authorization , " Token ${credentials.token} " )
205- append(" User-Id" , credentials.userId ? : " " )
206204 }
207205 timeout { socketTimeoutMillis = Long .MAX_VALUE }
208206 setBody(bodyJson)
Original file line number Diff line number Diff line change @@ -7,7 +7,6 @@ class TestConnector : PowerSyncBackendConnector() {
77 var fetchCredentialsCallback: suspend () -> PowerSyncCredentials ? = {
88 PowerSyncCredentials (
99 token = " test-token" ,
10- userId = " test-user" ,
1110 endpoint = " https://test.com" ,
1211 )
1312 }
Original file line number Diff line number Diff line change @@ -86,7 +86,6 @@ class SyncStreamTest {
8686 everySuspend { getCredentialsCached() } returns
8787 PowerSyncCredentials (
8888 token = " test-token" ,
89- userId = " test-user" ,
9089 endpoint = " https://test.com" ,
9190 )
9291 }
You can’t perform that action at this time.
0 commit comments