Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: supabase-community/supabase-kt
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 3.0.2
Choose a base ref
...
head repository: supabase-community/supabase-kt
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 3.0.3
Choose a head ref
  • 12 commits
  • 14 files changed
  • 2 contributors

Commits on Nov 12, 2024

  1. Update gradle & compose

    jan-tennert committed Nov 12, 2024
    Copy the full SHA
    fbc8717 View commit details

Commits on Nov 13, 2024

  1. Merge pull request #788 from supabase-community/update-gradle-compose

    Update to Gradle 11  & Compose 1.7.1
    jan-tennert authored Nov 13, 2024
    Copy the full SHA
    540638f View commit details

Commits on Nov 18, 2024

  1. Bump coil3 from 3.0.2 to 3.0.3

    Bumps `coil3` from 3.0.2 to 3.0.3.
    
    Updates `io.coil-kt.coil3:coil` from 3.0.2 to 3.0.3
    - [Release notes](https://github.com/coil-kt/coil/releases)
    - [Changelog](https://github.com/coil-kt/coil/blob/main/CHANGELOG.md)
    - [Commits](coil-kt/coil@3.0.2...3.0.3)
    
    Updates `io.coil-kt.coil3:coil-network-core` from 3.0.2 to 3.0.3
    - [Release notes](https://github.com/coil-kt/coil/releases)
    - [Changelog](https://github.com/coil-kt/coil/blob/main/CHANGELOG.md)
    - [Commits](coil-kt/coil@3.0.2...3.0.3)
    
    ---
    updated-dependencies:
    - dependency-name: io.coil-kt.coil3:coil
      dependency-type: direct:production
      update-type: version-update:semver-patch
    - dependency-name: io.coil-kt.coil3:coil-network-core
      dependency-type: direct:production
      update-type: version-update:semver-patch
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    dependabot[bot] authored Nov 18, 2024
    Copy the full SHA
    7594beb View commit details
  2. Merge pull request #792 from supabase-community/dependabot/gradle/coi…

    …l3-3.0.3
    
    Bump coil3 from 3.0.2 to 3.0.3
    jan-tennert authored Nov 18, 2024
    Copy the full SHA
    1073654 View commit details

Commits on Nov 24, 2024

  1. Update Gradle to 8.11.1

    jan-tennert committed Nov 24, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    4e843ba View commit details
  2. Merge pull request #793 from supabase-community/gradle-11-1

    Update Gradle to 8.11.1
    jan-tennert authored Nov 24, 2024
    Copy the full SHA
    46e2164 View commit details

Commits on Nov 25, 2024

  1. Bump co.touchlab:kermit from 2.0.4 to 2.0.5

    Bumps [co.touchlab:kermit](https://github.com/touchlab/Kermit) from 2.0.4 to 2.0.5.
    - [Release notes](https://github.com/touchlab/Kermit/releases)
    - [Changelog](https://github.com/touchlab/Kermit/blob/main/CHANGELOG.md)
    - [Commits](touchlab/Kermit@2.0.4...2.0.5)
    
    ---
    updated-dependencies:
    - dependency-name: co.touchlab:kermit
      dependency-type: direct:production
      update-type: version-update:semver-patch
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    dependabot[bot] authored Nov 25, 2024
    Copy the full SHA
    59ed013 View commit details
  2. Merge pull request #794 from supabase-community/dependabot/gradle/co.…

    …touchlab-kermit-2.0.5
    
    Bump co.touchlab:kermit from 2.0.4 to 2.0.5
    jan-tennert authored Nov 25, 2024
    Copy the full SHA
    79b1877 View commit details

Commits on Nov 26, 2024

  1. Add note about the minimum Android SDK version

    jan-tennert authored Nov 26, 2024
    Copy the full SHA
    ddb16b3 View commit details

Commits on Dec 2, 2024

  1. Bump coil3 from 3.0.3 to 3.0.4

    Bumps `coil3` from 3.0.3 to 3.0.4.
    
    Updates `io.coil-kt.coil3:coil` from 3.0.3 to 3.0.4
    - [Release notes](https://github.com/coil-kt/coil/releases)
    - [Changelog](https://github.com/coil-kt/coil/blob/main/CHANGELOG.md)
    - [Commits](coil-kt/coil@3.0.3...3.0.4)
    
    Updates `io.coil-kt.coil3:coil-network-core` from 3.0.3 to 3.0.4
    - [Release notes](https://github.com/coil-kt/coil/releases)
    - [Changelog](https://github.com/coil-kt/coil/blob/main/CHANGELOG.md)
    - [Commits](coil-kt/coil@3.0.3...3.0.4)
    
    ---
    updated-dependencies:
    - dependency-name: io.coil-kt.coil3:coil
      dependency-type: direct:production
      update-type: version-update:semver-patch
    - dependency-name: io.coil-kt.coil3:coil-network-core
      dependency-type: direct:production
      update-type: version-update:semver-patch
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    dependabot[bot] authored Dec 2, 2024
    Copy the full SHA
    5f1132f View commit details
  2. Merge pull request #802 from supabase-community/dependabot/gradle/coi…

    …l3-3.0.4
    
    Bump coil3 from 3.0.3 to 3.0.4
    jan-tennert authored Dec 2, 2024
    Copy the full SHA
    af6f770 View commit details

Commits on Dec 4, 2024

  1. Merge pull request #796 from supabase-community/kotlin-2-1-0

    Update Kotlin to 2.1.0
    jan-tennert authored Dec 4, 2024
    Copy the full SHA
    4f822b7 View commit details
9 changes: 8 additions & 1 deletion Auth/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -38,7 +38,9 @@ kotlin {
val commonMain by getting {
dependencies {
addModules(SupabaseModule.SUPABASE)
implementation(libs.krypto)
// implementation(libs.krypto)
implementation(libs.secure.random)
api(libs.okio)
}
}
val desktopMain by getting {
@@ -65,6 +67,11 @@ kotlin {
api(libs.androidx.browser)
}
}
val wasmJsMain by getting {
dependencies {
api(libs.kotlinx.browser)
}
}
}
}

12 changes: 6 additions & 6 deletions Auth/src/commonMain/kotlin/io/github/jan/supabase/auth/PKCE.kt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
@file:Suppress("MatchingDeclarationName")
package io.github.jan.supabase.auth

import korlibs.crypto.SHA256
import korlibs.crypto.SecureRandom
import okio.ByteString.Companion.toByteString
import org.kotlincrypto.SecureRandom
import kotlin.io.encoding.Base64
import kotlin.io.encoding.ExperimentalEncodingApi

@@ -14,13 +14,13 @@ internal object PKCEConstants {
@OptIn(ExperimentalEncodingApi::class)
internal fun generateCodeVerifier(): String {
val bytes = ByteArray(PKCEConstants.VERIFIER_LENGTH)
SecureRandom.nextBytes(bytes)
SecureRandom().nextBytesCopyTo(bytes)
return Base64.UrlSafe.encode(bytes)
}

@OptIn(ExperimentalEncodingApi::class)
internal fun generateCodeChallenge(codeVerifier: String): String {
val bytes = codeVerifier.encodeToByteArray()
val hash = SHA256.digest(bytes)
return Base64.UrlSafe.encode(hash.bytes).replace("=", "")
val byteString = codeVerifier.encodeToByteArray().toByteString()
val hash = byteString.sha256()
return Base64.UrlSafe.encode(hash.toByteArray()).replace("=", "")
}
2 changes: 1 addition & 1 deletion Functions/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -28,7 +28,7 @@ kotlin {
}

android {
compileSdk = 34
compileSdk = 35
sourceSets["main"].manifest.srcFile("src/androidMain/AndroidManifest.xml")
namespace = "io.github.jan.supabase.functions.library"
defaultConfig {
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -10,8 +10,8 @@ For information about supported Kotlin targets, see the corresponding module REA

[![](https://img.shields.io/github/release/supabase-community/supabase-kt?label=stable)](https://github.com/supabase-community/supabase-kt/releases)
[![](https://badgen.net/github/release/supabase-community/supabase-kt?label=prerelease)](https://central.sonatype.com/search?q=io.github.jan.supabase&smo=true)
[![Kotlin](https://img.shields.io/badge/kotlin-2.0.21-blue.svg?logo=kotlin)](http://kotlinlang.org)
[![Ktor](https://img.shields.io/badge/ktor-3.0.0-blue)](https://ktor.io/)
[![Kotlin](https://img.shields.io/badge/kotlin-2.1.0-blue.svg?logo=kotlin)](http://kotlinlang.org)
[![Ktor](https://img.shields.io/badge/ktor-3.0.1-blue)](https://ktor.io/)
[![slack](https://img.shields.io/badge/slack-%23supabase--kt-purple.svg?logo=slack)](https://kotlinlang.slack.com/archives/C06QXPC7064)

### Links
@@ -54,6 +54,8 @@ implementation(platform("io.github.jan-tennert.supabase:bom:VERSION"))
implementation("io.github.jan-tennert.supabase:[module]")
```

*Note that the minimum Android SDK version is 26. For lower versions, you need to enable [core library desugaring](https://developer.android.com/studio/write/java8-support#library-desugaring).*

### Add a Ktor Client Engine to each of your Kotlin targets

You can find a list of available engines [here](https://ktor.io/docs/http-client-engines.html).
@@ -99,7 +101,7 @@ val iosMain by getting {
**Note:** It is recommended to use the same Ktor version as supabase-kt:

__For 3.0.0 and above:__
[![Ktor](https://img.shields.io/badge/ktor-3.0.0-blue)](https://ktor.io/)
[![Ktor](https://img.shields.io/badge/ktor-3.0.1-blue)](https://ktor.io/)

__For versions below 3.0.0:__
[![Ktor](https://img.shields.io/badge/ktor-2.3.12-blue)](https://ktor.io/)
@@ -169,4 +171,4 @@ Checkout the [contribution guidelines](/CONTRIBUTING.md) for more information.

## Sponsoring

If you like the project and want to support it, consider sponsoring me on [Ko-fi](https://ko-fi.com/jantennert) or directly on [PayPal](https://www.paypal.com/donate/?hosted_button_id=SR3YJS5CZFS9L).
If you like the project and want to support it, consider sponsoring me on [Ko-fi](https://ko-fi.com/jantennert) or directly on [PayPal](https://www.paypal.com/donate/?hosted_button_id=SR3YJS5CZFS9L).
2 changes: 1 addition & 1 deletion demos/android-login/android/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -19,7 +19,7 @@ dependencies {
}

android {
compileSdk = 34
compileSdk = 35
defaultConfig {
applicationId = "io.github.jan.supabase.android"
minSdk = 26
2 changes: 1 addition & 1 deletion demos/android-login/common/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -48,7 +48,7 @@ kotlin {
}

android {
compileSdk = 34
compileSdk = 35
sourceSets["main"].manifest.srcFile("src/androidMain/AndroidManifest.xml")
namespace = "io.github.jan.supabase.common"
defaultConfig {
2 changes: 1 addition & 1 deletion demos/multiplatform-deeplinks/android/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -14,7 +14,7 @@ dependencies {
}

android {
compileSdk = 34
compileSdk = 35
defaultConfig {
applicationId = "io.github.jan.supabase.android"
minSdk = 26
2 changes: 1 addition & 1 deletion demos/multiplatform-deeplinks/common/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -51,7 +51,7 @@ kotlin {
}

android {
compileSdk = 34
compileSdk = 35
sourceSets["main"].manifest.srcFile("src/androidMain/AndroidManifest.xml")
namespace = "io.github.jan.supabase.common"
defaultConfig {
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -10,5 +10,5 @@ org.jetbrains.compose.experimental.uikit.enabled=true
org.jetbrains.compose.experimental.jscanvas.enabled=true
org.jetbrains.compose.experimental.wasm.enabled=true

supabase-version = 3.0.2
supabase-version = 3.0.3
base-group = io.github.jan-tennert.supabase
22 changes: 13 additions & 9 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,38 +1,40 @@
[versions]
kotlin = "2.0.21"
kotlin = "2.1.0"
accompanist-permissions = "0.36.0"
ktor = "3.0.1"
ktor = "3.0.2"
dokka = "1.9.20"
kotlinx-datetime = "0.6.1"
kermit = "2.0.4"
atomicfu = "0.26.0"
kermit = "2.0.5"
atomicfu = "0.26.1"
coroutines = "1.9.0"
android-lifecycle = "2.8.7"
androidx-startup = "1.2.0"
androidx-activity-compose = "1.9.3"
multiplatform-settings = "1.2.0"
multiplatform-settings = "1.3.0"
complete-kotlin = "1.1.0"
agp = "8.5.2"
maven-publish = "0.30.0"
apollo-kotlin = "4.1.0"
korlibs = "4.0.10"
korlibs = "6.0.0"
detekt = "1.23.7"
moshi = "1.15.1"
jackson = "2.18.1"
browser = "1.8.0"
googleid = "1.1.1"
compose = "1.7.0"
compose = "1.7.1"
androidsvg = "1.4"
imageloader = "1.9.0"
coil2 = "2.7.0"
coil3 = "3.0.2"
coil3 = "3.0.4"
okio = "3.9.1"
credentials = "1.3.0"
koin = "4.0.0"
androidx-core = "1.15.0"
androidx-compat = "1.7.0"
androidx-lifecycle = "2.8.7"
filekit = "0.8.7"
kotlinx-browser = "0.3"
secure-random = "0.3.2"

[plugins]
kotlin-multiplatform = { id = "org.jetbrains.kotlin.multiplatform", version.ref = "kotlin" }
@@ -54,6 +56,7 @@ power-assert = { id = "org.jetbrains.kotlin.plugin.power-assert", version.ref =
[libraries]
kotlinx-atomicfu = { module = "org.jetbrains.kotlinx:atomicfu", version.ref = "atomicfu" }
kotlinx-datetime = { module = "org.jetbrains.kotlinx:kotlinx-datetime", version.ref = "kotlinx-datetime" }
kotlinx-browser = { module = "org.jetbrains.kotlinx:kotlinx-browser", version.ref = "kotlinx-browser" }
kotlinx-coroutines-core = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version.ref = "coroutines" }
kotlinx-coroutines-play-services = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-play-services", version.ref = "coroutines" }
kotlinx-coroutines-test = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-test", version.ref = "coroutines" }
@@ -98,7 +101,8 @@ multiplatform-settings-test = { module = "com.russhwolf:multiplatform-settings-t

apollo-kotlin = { module = "com.apollographql.apollo:apollo-runtime", version.ref = "apollo-kotlin" }

krypto = { module = "com.soywiz.korlibs.krypto:krypto", version.ref = "korlibs" }
krypto = { module = "com.soywiz:korlibs-crypto", version.ref = "korlibs" }
secure-random = { module = "org.kotlincrypto:secure-random", version.ref = "secure-random" }
okio = { module = "com.squareup.okio:okio", version.ref = "okio" }

moshi = { module = "com.squareup.moshi:moshi", version.ref = "moshi" }
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
2 changes: 1 addition & 1 deletion plugins/ComposeAuth/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -34,7 +34,7 @@ kotlin {
dependencies {
addModules(SupabaseModule.AUTH)
implementation(compose.runtime)
implementation(libs.krypto)
// implementation(libs.krypto)
}
}
val androidMain by getting {
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
package io.github.jan.supabase.compose.auth

import io.ktor.utils.io.core.toByteArray
import korlibs.crypto.SHA256
import okio.ByteString.Companion.toByteString

internal fun String.hash(): String {
val hash = SHA256.digest(this.toByteArray())
return hash.hex
val hash = this.encodeToByteArray().toByteString()
return hash.sha256().hex()
}