Skip to content
Closed
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
18 changes: 15 additions & 3 deletions V4_MIGRATION_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,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)`.

Choose a reason for hiding this comment

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

nit: we can drop this message as there might be more changes that need to be incorporated by clients tp upgrade their code base to kotline 2..20 and instead we can add a kotlin official documentaion on how to upgrade from older to 2.2.x


## Breaking Changes

### Classes Removed
Expand Down Expand Up @@ -172,6 +173,17 @@ The legacy constructor is deprecated but **not removed** — existing code will
and run. Your IDE will show a deprecation warning with a suggested `ReplaceWith` quick-fix to
migrate to the Builder.

### 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 @@ -170,7 +170,7 @@ public object 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 @@ -392,7 +392,7 @@ public object 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