Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 15 additions & 2 deletions V4_MIGRATION_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,16 @@ buildscript {

### Kotlin Version

v4 uses **Kotlin 2.0.21**. If you're using Kotlin in your project, you may need to update your Kotlin version to ensure compatibility.
v4 uses **Kotlin 2.2.0**. If you're using Kotlin in your project, you may need to update your Kotlin version to ensure compatibility.

```groovy
buildscript {
ext.kotlin_version = "2.0.21"
ext.kotlin_version = "2.2.0"
}
```

> **Note:** Kotlin 2.2.0 promotes the deprecation of `String.toLowerCase()` / `String.toUpperCase()` without a `Locale` parameter to an error. If your project uses these methods, replace them with `lowercase(Locale.ROOT)` / `uppercase(Locale.ROOT)`.
Copy link

@sanchitmehtagit sanchitmehtagit Feb 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: We could remove this note, I think this note applies to users who have to update kotlin version and they may have more breaking changes in their code base to implement along with this while upgrading.https://kotlinlang.org/docs/compatibility-guide-22.html thoughts on this . or we could also add official doc for Kotlin 2.2.x for how to upgrade instead


## Breaking Changes

### Classes Removed
Expand Down Expand Up @@ -96,6 +98,17 @@ implementation 'com.google.code.gson:gson:2.8.9' // your preferred version

> **Note:** Pinning or excluding is not recommended long-term, as the SDK has been tested and validated against Gson 2.11.0.

### OkHttp 4.12.0 → 5.0.0 (Internal Dependency)

v4 upgrades the internal OkHttp dependency from **4.12.0** to **5.0.0**. OkHttp is used as an `implementation` dependency and is **not** exposed in the SDK's public API, so this change should be transparent to most applications.

However, if your app provides a custom `NetworkingClient` implementation that interacts with OkHttp types, or if you depend on OkHttp transitively through the SDK, be aware of the following:

- **OkHttp 5.0.0 requires Kotlin 2.2.0+** at compile time. This is already satisfied by the SDK's Kotlin version requirement.
- **Okio 3.x is now required.** OkHttp 5.0.0 depends on Okio 3.x (previously Okio 2.x). If your app uses Okio directly, you may need to update your Okio dependency.

> **Note:** Since OkHttp is an internal dependency of the SDK, no changes are required in your application code unless you are directly depending on OkHttp types from this SDK's classpath.

## Getting Help

If you encounter issues during migration:
Expand Down
4 changes: 2 additions & 2 deletions auth0/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ android {
}

ext {
okhttpVersion = '4.12.0'
okhttpVersion = '5.0.0'
coroutinesVersion = '1.10.2'
biometricLibraryVersion = '1.1.0'
}
Expand All @@ -104,7 +104,7 @@ dependencies {
testImplementation 'org.hamcrest:java-hamcrest:2.0.0.0'
testImplementation 'org.mockito:mockito-core:5.14.0'
testImplementation 'org.mockito.kotlin:mockito-kotlin:5.4.0'
testImplementation "com.squareup.okhttp3:mockwebserver:$okhttpVersion"
testImplementation "com.squareup.okhttp3:mockwebserver3:$okhttpVersion"
testImplementation "com.squareup.okhttp3:okhttp-tls:$okhttpVersion"
testImplementation 'com.jayway.awaitility:awaitility:1.7.0'
testImplementation 'org.robolectric:robolectric:4.15.1'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ public object WebAuthProvider : SenderConstraining<WebAuthProvider> {
* @return the current builder instance
*/
public fun withScheme(scheme: String): LogoutBuilder {
val lowerCase = scheme.toLowerCase(Locale.ROOT)
val lowerCase = scheme.lowercase(Locale.ROOT)
if (scheme != lowerCase) {
Log.w(
TAG,
Expand Down Expand Up @@ -397,7 +397,7 @@ public object WebAuthProvider : SenderConstraining<WebAuthProvider> {
* @return the current builder instance
*/
public fun withScheme(scheme: String): Builder {
val lowerCase = scheme.toLowerCase(Locale.ROOT)
val lowerCase = scheme.lowercase(Locale.ROOT)
if (scheme != lowerCase) {
Log.w(
TAG,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ internal object OidcUtils {
*/
fun includeRequiredScope(scope: String): String {
val existingScopes = scope.split(" ")
.map { it.toLowerCase(Locale.ROOT) }
.map { it.lowercase(Locale.ROOT) }
return if (!existingScopes.contains(REQUIRED_SCOPE)) {
(existingScopes + REQUIRED_SCOPE).joinToString(separator = " ").trim()
} else {
Expand Down
Loading
Loading