|
1 | 1 | # Changelog
|
2 | 2 |
|
| 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 | + |
3 | 74 | ### 3.1.4 - April 1, 2025
|
4 | 75 |
|
5 | 76 | ### All modules
|
|
0 commit comments