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
8 files changed +7
-11
lines changed Original file line number Diff line number Diff line change 3
3
## 1.0.0-BETA32
4
4
5
5
* Added ` onChange ` method to the PowerSync client. This allows for observing table changes.
6
+ * Removed unnecessary ` User-Id ` header from internal PowerSync service requests.
6
7
* Fix loading native PowerSync extension for Java targets.
7
8
8
9
## 1.0.0-BETA31
Original file line number Diff line number Diff line change @@ -47,9 +47,6 @@ Current limitations:
47
47
48
48
- Integration with SQLDelight schema and API generation (ORM) is not yet supported.
49
49
50
- Future work/ideas:
51
- - Attachments helper package.
52
-
53
50
## Installation
54
51
55
52
Add 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(
164
164
165
165
check(session.user != null ) { " No user data" }
166
166
167
- // userId is for debugging purposes only
168
167
PowerSyncCredentials (
169
168
endpoint = powerSyncEndpoint,
170
169
token = session.accessToken, // Use the access token to authenticate against PowerSync
171
- userId = session.user!! .id,
172
170
)
173
171
}
174
172
Original file line number Diff line number Diff line change @@ -100,7 +100,6 @@ internal class ActiveDatabaseTest(
100
100
everySuspend { getCredentialsCached() } returns
101
101
PowerSyncCredentials (
102
102
token = " test-token" ,
103
- userId = " test-user" ,
104
103
endpoint = " https://test.com" ,
105
104
)
106
105
Original file line number Diff line number Diff line change @@ -19,7 +19,12 @@ public data class PowerSyncCredentials(
19
19
/* *
20
20
* User ID.
21
21
*/
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 ,
23
28
) {
24
29
override fun toString (): String = " PowerSyncCredentials<endpoint: $endpoint userId: $userId >"
25
30
Original file line number Diff line number Diff line change @@ -174,7 +174,6 @@ internal class SyncStream(
174
174
contentType(ContentType .Application .Json )
175
175
headers {
176
176
append(HttpHeaders .Authorization , " Token ${credentials.token} " )
177
- append(" User-Id" , credentials.userId ? : " " )
178
177
}
179
178
}
180
179
if (response.status.value == 401 ) {
@@ -202,7 +201,6 @@ internal class SyncStream(
202
201
contentType(ContentType .Application .Json )
203
202
headers {
204
203
append(HttpHeaders .Authorization , " Token ${credentials.token} " )
205
- append(" User-Id" , credentials.userId ? : " " )
206
204
}
207
205
timeout { socketTimeoutMillis = Long .MAX_VALUE }
208
206
setBody(bodyJson)
Original file line number Diff line number Diff line change @@ -7,7 +7,6 @@ class TestConnector : PowerSyncBackendConnector() {
7
7
var fetchCredentialsCallback: suspend () -> PowerSyncCredentials ? = {
8
8
PowerSyncCredentials (
9
9
token = " test-token" ,
10
- userId = " test-user" ,
11
10
endpoint = " https://test.com" ,
12
11
)
13
12
}
Original file line number Diff line number Diff line change @@ -86,7 +86,6 @@ class SyncStreamTest {
86
86
everySuspend { getCredentialsCached() } returns
87
87
PowerSyncCredentials (
88
88
token = " test-token" ,
89
- userId = " test-user" ,
90
89
endpoint = " https://test.com" ,
91
90
)
92
91
}
You can’t perform that action at this time.
0 commit comments