Skip to content

Commit 6bc991d

Browse files
authored
Merge pull request #976 from supabase-community/v3.2.0
Update version
2 parents fc39832 + 325a86a commit 6bc991d

File tree

11 files changed

+112
-44
lines changed

11 files changed

+112
-44
lines changed

CHANGELOG.md

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,76 @@
11
# Changelog
22

3+
### 3.2.0 - June 25, 2025
4+
5+
### All modules
6+
7+
- Don't swallow `CancellationException` by @sproctor in #895
8+
- Only catch serialization exceptions in `bodyOrNull` by @jan-tennert in https://github.com/supabase-community/supabase-kt/pull/904
9+
- Fix simple warnings by @sproctor in https://github.com/supabase-community/supabase-kt/pull/915
10+
- Use Dispatchers.IO by default on multi-threaded platforms by @sproctor in https://github.com/supabase-community/supabase-kt/pull/905
11+
- Configurable default dispatcher `SupabaseClientBuilder#coroutineDispatcher`, defaulting to `Dispatchers.IO` on supported targets.
12+
- Deprecated `AuthConfig#coroutineDispatcher`, replaced by the new client wide dispatcher.
13+
14+
### Core
15+
16+
* Add new standard headers by @jan-tennert in https://github.com/supabase-community/supabase-kt/pull/927
17+
18+
### Auth
19+
20+
* Add new event system, add support for error code in OTP links by @jan-tennert in https://github.com/supabase-community/supabase-kt/pull/912
21+
```kotlin
22+
supabase.auth.events.collect {
23+
when(it) {
24+
is AuthEvent.OtpError -> {
25+
println(it.errorCode)
26+
}
27+
is AuthEvent.RefreshFailure -> TODO()
28+
}
29+
}
30+
```
31+
New event system which exists next to the `sessionStatus`, but works independently. Currently there are two events:
32+
- `AuthEvent.OtpError(...)` - will be emitted if an error code was found in a OTP link (deeplink on Android/iOS, URL on JS and Desktop)
33+
- `AuthEvent.RefreshFailure(cause)` - will be emitted if a session refresh failed (regardless if the session is still valid)
34+
35+
This PR also changes the `SessionStatus.RefreshFailure(cause)`:
36+
- The `cause` parameter/property is deprecated (use the event for the cause)
37+
- This status will only get set, if the session expired.
38+
39+
--> If a refresh failed, an event will always be emitted, but the session status will only get updated if the session also expired. Planning to rename the status in the future to something like `SessionStatus.NeedsRefresh`
40+
41+
Additional changes:
42+
- Error related parameters will now be removed from the history when used
43+
* Deprecate NativeSignInResult.NetworkError as it isn't used by @jan-tennert in https://github.com/supabase-community/supabase-kt/pull/952
44+
* (JS, WASM JS) Add an option to disable automatic url checking by @jan-tennert in https://github.com/supabase-community/supabase-kt/pull/96
45+
```kotlin
46+
install(Auth) {
47+
disableUrlChecking = true //Default: false
48+
}
49+
```
50+
* Deprecate minimalSettings in favor of minimalConfig by @jan-tennert in https://github.com/supabase-community/supabase-kt/pull/916
51+
* Fix null result when sign up with Email provider by @hieuwu in https://github.com/supabase-community/supabase-kt/pull/922
52+
* Add support for providing a custom url launcher by @jan-tennert in https://github.com/supabase-community/supabase-kt/pull/933
53+
You can now provide a custom `UrlLauncher` for opening URLs in the OAuth flow:
54+
```kotlin
55+
install(Auth) {
56+
urlLauncher = UrlLauncher { supabase, url ->
57+
println("Opening URL: $url")
58+
}
59+
}
60+
```
61+
- Fix OAuth server listener resuming coroutine twice by @jan-tennert in #893
62+
A Desktop app using OAuth should no longer produce an exception when exiting the app after using `signInWith(OAuthProvider)`
63+
- Add missing error codes by @jan-tennert in https://github.com/supabase-community/supabase-kt/pull/909:
64+
`EmailAddressInvalid`, `Web3ProviderDisabled`, `Web3UnsupportedChain`
65+
- (JS/Wasm JS) Fix exception on non-session hash parameters and only consume used parameters by @jan-tennert in https://github.com/supabase-community/supabase-kt/pull/911
66+
Previously, all URL parameters / hash parameter were removed after successfully authenticating, this is no longer the case.
67+
- Fix session expiration check by @jan-tennert in https://github.com/supabase-community/supabase-kt/pull/913
68+
The session will now also be refreshed when the current date time is under a certain threshold (20% before the actual expiration), instead of only after session expiration
69+
70+
### Postgrest
71+
72+
* Fix serialization exception occurring when `PostgrestRestException#details` is not a String by @jan-tennert in https://github.com/supabase-community/supabase-kt/pull/956
73+
374
### 3.1.4 - April 1, 2025
475

576
### All modules

Functions/build.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ kotlin {
1313
defaultConfig()
1414
allTargets()
1515
sourceSets {
16-
val commonMain by getting {
16+
commonMain {
1717
dependencies {
1818
addModules(SupabaseModule.AUTH, SupabaseModule.SUPABASE)
1919
}
2020
}
21-
val commonTest by getting {
21+
commonTest {
2222
dependencies {
2323
implementation(project(":test-common"))
2424
implementation(libs.bundles.testing)

Postgrest/build.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@ kotlin {
1414
defaultConfig()
1515
allTargets()
1616
sourceSets {
17-
val commonMain by getting {
17+
commonMain {
1818
dependencies {
1919
addModules(SupabaseModule.AUTH)
2020
api(libs.kotlin.reflect)
2121
}
2222
}
23-
val commonTest by getting {
23+
commonTest {
2424
dependencies {
2525
implementation(libs.bundles.testing)
2626
implementation(project(":test-common"))

README.md

Lines changed: 23 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ For information about supported Kotlin targets, see the corresponding module REA
1010

1111
[![](https://img.shields.io/github/release/supabase-community/supabase-kt?label=stable)](https://github.com/supabase-community/supabase-kt/releases)
1212
[![](https://badgen.net/github/release/supabase-community/supabase-kt?label=prerelease)](https://central.sonatype.com/search?q=io.github.jan.supabase&smo=true)
13-
[![Kotlin](https://img.shields.io/badge/kotlin-2.1.10-blue.svg?logo=kotlin)](http://kotlinlang.org)
14-
[![Ktor](https://img.shields.io/badge/ktor-3.1.1-blue)](https://ktor.io/)
13+
[![Kotlin](https://img.shields.io/badge/kotlin-2.2.0-blue.svg?logo=kotlin)](http://kotlinlang.org)
14+
[![Ktor](https://img.shields.io/badge/ktor-3.2.0-blue)](https://ktor.io/)
1515
[![slack](https://img.shields.io/badge/slack-%23supabase--kt-purple.svg?logo=slack)](https://kotlinlang.slack.com/archives/C06QXPC7064)
1616

1717
[![ko-fi](https://www.ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/jantennert)
@@ -74,27 +74,29 @@ implementation("io.ktor:ktor-client-[engine]:VERSION")
7474
For targets: `jvm`, `android`, `js`, `ios`
7575

7676
```kotlin
77-
val commonMain by getting {
78-
dependencies {
79-
//supabase modules
77+
sourceSets {
78+
commonMain {
79+
dependencies {
80+
//Supabase modules
81+
}
8082
}
81-
}
82-
val jvmMain by getting {
83-
dependencies {
84-
implementation("io.ktor:ktor-client-cio:KTOR_VERSION")
83+
jvmMain {
84+
dependencies {
85+
implementation("io.ktor:ktor-client-cio:KTOR_VERSION")
86+
}
8587
}
86-
}
87-
val androidMain by getting {
88-
dependsOn(jvmMain)
89-
}
90-
val jsMain by getting {
91-
dependencies {
92-
implementation("io.ktor:ktor-client-js:KTOR_VERSION")
88+
androidMain {
89+
dependsOn(jvmMain.get())
9390
}
94-
}
95-
val iosMain by getting {
96-
dependencies {
97-
implementation("io.ktor:ktor-client-darwin:KTOR_VERSION")
91+
jsMain {
92+
dependencies {
93+
implementation("io.ktor:ktor-client-js:KTOR_VERSION")
94+
}
95+
}
96+
iosMain {
97+
dependencies {
98+
implementation("io.ktor:ktor-client-darwin:KTOR_VERSION")
99+
}
98100
}
99101
}
100102
```
@@ -103,7 +105,7 @@ val iosMain by getting {
103105
**Note:** It is recommended to use the same Ktor version as supabase-kt:
104106

105107
__For 3.0.0 and above:__
106-
[![Ktor](https://img.shields.io/badge/ktor-3.1.1-blue)](https://ktor.io/)
108+
[![Ktor](https://img.shields.io/badge/ktor-3.2.0-blue)](https://ktor.io/)
107109

108110
__For versions below 3.0.0:__
109111
[![Ktor](https://img.shields.io/badge/ktor-2.3.12-blue)](https://ktor.io/)

Realtime/build.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@ kotlin {
1414
defaultConfig()
1515
allTargets()
1616
sourceSets {
17-
val commonMain by getting {
17+
commonMain {
1818
dependencies {
1919
addModules(SupabaseModule.AUTH)
2020
api(project(":postgrest-kt"))
2121
api(libs.ktor.client.websockets)
2222
}
2323
}
24-
val commonTest by getting {
24+
commonTest {
2525
dependencies {
2626
implementation(project(":test-common"))
2727
implementation(libs.bundles.testing)

Storage/build.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ kotlin {
2020
}
2121
allTargets()
2222
sourceSets {
23-
val commonMain by getting {
23+
commonMain {
2424
dependencies {
2525
addModules(SupabaseModule.AUTH)
2626
}
2727
}
28-
val commonTest by getting {
28+
commonTest {
2929
dependencies {
3030
implementation(project(":test-common"))
3131
implementation(libs.bundles.testing)

Supabase/build.gradle.kts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ kotlin {
3737
defaultConfig()
3838
allTargets()
3939
sourceSets {
40-
val commonMain by getting {
40+
commonMain {
4141
kotlin.srcDir(
4242
// convert the task to a file-provider
4343
buildConfigGenerator.map { it.destinationDir }
@@ -50,12 +50,12 @@ kotlin {
5050
api(libs.kotlinx.atomicfu)
5151
}
5252
}
53-
val commonTest by getting {
53+
commonTest {
5454
dependencies {
5555
implementation(libs.bundles.testing)
5656
}
5757
}
58-
val androidMain by getting {
58+
androidMain {
5959
dependencies {
6060
api(libs.android.lifecycle.process)
6161
}

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@ org.jetbrains.compose.experimental.jscanvas.enabled=true
1111
org.jetbrains.compose.experimental.wasm.enabled=true
1212
org.jetbrains.dokka.experimental.gradle.pluginMode=V2Enabled
1313

14-
supabase-version = 3.2.0-rc-1
14+
supabase-version = 3.2.0
1515
base-group = io.github.jan-tennert.supabase

serializers/Jackson/build.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@ kotlin {
1515
configuredAndroidTarget()
1616
configuredJvmTarget()
1717
sourceSets {
18-
val commonMain by getting {
18+
commonMain {
1919
dependencies {
2020
addModules(SupabaseModule.SUPABASE)
2121
api(libs.bundles.jackson)
2222
}
2323
}
24-
val commonTest by getting {
24+
commonTest {
2525
dependencies {
2626
implementation(libs.bundles.testing)
2727
implementation(project(":test-common"))

serializers/Moshi/build.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@ kotlin {
1515
configuredAndroidTarget()
1616
configuredJvmTarget()
1717
sourceSets {
18-
val commonMain by getting {
18+
commonMain {
1919
dependencies {
2020
addModules(SupabaseModule.SUPABASE)
2121
implementation(libs.kotlin.reflect)
2222
implementation(libs.bundles.moshi)
2323
}
2424
}
25-
val commonTest by getting {
25+
commonTest {
2626
dependencies {
2727
implementation(libs.bundles.testing)
2828
implementation(project(":test-common"))

0 commit comments

Comments
 (0)