You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> This feature is currently available in [Early Access](https://auth0.com/docs/troubleshoot/product-lifecycle/product-release-stages#early-access). Please reach out to Auth0 support to get it enabled for your tenant.
235
235
236
-
[DPoP](https://www.rfc-editor.org/rfc/rfc9449.html) (Demonstrating Proof of Possession) is an application-level mechanism for sender-constraining OAuth 2.0 access and refresh tokens by proving that the app is in possession of a certain private key. You can enable it by calling the `useDPoP()` method.
236
+
[DPoP](https://www.rfc-editor.org/rfc/rfc9449.html) (Demonstrating Proof of Possession) is an application-level mechanism for sender-constraining OAuth 2.0 access and refresh tokens by proving that the app is in possession of a certain private key. You can enable it by calling the `useDPoP(context)` method on the login Builder.
Copy file name to clipboardExpand all lines: V4_MIGRATION_GUIDE.md
+60-13Lines changed: 60 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,9 @@
2
2
3
3
## Overview
4
4
5
-
v4 of the Auth0 Android SDK includes significant build toolchain updates to support the latest Android development environment. This guide documents the changes required when migrating from v3 to v4.
5
+
v4 of the Auth0 Android SDK includes significant build toolchain updates to support the latest
6
+
Android development environment. This guide documents the changes required when migrating from v3 to
7
+
v4.
6
8
7
9
## Requirements Changes
8
10
@@ -50,7 +52,8 @@ buildscript {
50
52
51
53
### Kotlin Version
52
54
53
-
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.
55
+
v4 uses **Kotlin 2.0.21**. If you're using Kotlin in your project, you may need to update your
56
+
Kotlin version to ensure compatibility.
54
57
55
58
```groovy
56
59
buildscript {
@@ -62,20 +65,59 @@ buildscript {
62
65
63
66
### Classes Removed
64
67
65
-
- The `com.auth0.android.provider.PasskeyAuthProvider` class has been removed. Use the APIs from the [AuthenticationAPIClient](auth0/src/main/java/com/auth0/android/authentication/AuthenticationAPIClient.kt) class for passkey operations:
66
-
-[passkeyChallenge()](auth0/src/main/java/com/auth0/android/authentication/AuthenticationAPIClient.kt#L366-L387) - Request a challenge to initiate passkey login flow
67
-
-[signinWithPasskey()](auth0/src/main/java/com/auth0/android/authentication/AuthenticationAPIClient.kt#L235-L253) - Sign in a user using passkeys
68
-
-[signupWithPasskey()](auth0/src/main/java/com/auth0/android/authentication/AuthenticationAPIClient.kt#L319-L344) - Sign up a user and returns a challenge for key generation
68
+
- The `com.auth0.android.provider.PasskeyAuthProvider` class has been removed. Use the APIs from
69
+
the [AuthenticationAPIClient](auth0/src/main/java/com/auth0/android/authentication/AuthenticationAPIClient.kt)
v4 updates the internal Gson dependency from **2.8.9** to **2.11.0**. While the SDK does not expose Gson types in its public API, Gson is included as a transitive runtime dependency. If your app also uses Gson, be aware of the following changes introduced in Gson 2.10+:
110
+
v4 updates the internal Gson dependency from **2.8.9** to **2.11.0**. While the SDK does not expose
111
+
Gson types in its public API, Gson is included as a transitive runtime dependency. If your app also
112
+
uses Gson, be aware of the following changes introduced in Gson 2.10+:
75
113
76
-
-**`TypeToken` with unresolved type variables is rejected at runtime.** Code like `object : TypeToken<List<T>>() {}` (where `T` is a generic parameter) will throw `IllegalArgumentException`. Use Kotlin `reified` type parameters or pass concrete types instead.
77
-
-**Strict type coercion is enforced.** Gson no longer silently coerces JSON objects or arrays to `String`. If your code relies on this behavior, you will see `JsonSyntaxException`.
78
-
-**Built-in ProGuard/R8 rules are included.** Gson 2.11.0 ships its own keep rules, so you may be able to remove custom Gson ProGuard rules from your project.
114
+
-**`TypeToken` with unresolved type variables is rejected at runtime.** Code like
115
+
`object : TypeToken<List<T>>() {}` (where `T` is a generic parameter) will throw
116
+
`IllegalArgumentException`. Use Kotlin `reified` type parameters or pass concrete types instead.
117
+
-**Strict type coercion is enforced.** Gson no longer silently coerces JSON objects or arrays to
118
+
`String`. If your code relies on this behavior, you will see `JsonSyntaxException`.
119
+
-**Built-in ProGuard/R8 rules are included.** Gson 2.11.0 ships its own keep rules, so you may be
120
+
able to remove custom Gson ProGuard rules from your project.
79
121
80
122
If you need to pin Gson to an older version, you can use Gradle's `resolutionStrategy`:
implementation 'com.google.code.gson:gson:2.8.9' // your preferred version
95
137
```
96
138
97
-
> **Note:** Pinning or excluding is not recommended long-term, as the SDK has been tested and validated against Gson 2.11.0.
139
+
> **Note:** Pinning or excluding is not recommended long-term, as the SDK has been tested and
140
+
> validated against Gson 2.11.0.
98
141
99
142
### DefaultClient.Builder
100
143
101
-
v4 introduces a `DefaultClient.Builder` for configuring the HTTP client. This replaces the constructor-based approach with a more flexible builder pattern that supports additional options such as write/call timeouts, custom interceptors, and custom loggers.
144
+
v4 introduces a `DefaultClient.Builder` for configuring the HTTP client. This replaces the
145
+
constructor-based approach with a more flexible builder pattern that supports additional options
146
+
such as write/call timeouts, custom interceptors, and custom loggers.
102
147
103
148
**v3 (constructor-based — deprecated):**
104
149
@@ -123,7 +168,9 @@ val client = DefaultClient.Builder()
123
168
.build()
124
169
```
125
170
126
-
The legacy constructor is deprecated but **not removed** — existing code will continue to compile and run. Your IDE will show a deprecation warning with a suggested `ReplaceWith` quick-fix to migrate to the Builder.
171
+
The legacy constructor is deprecated but **not removed** — existing code will continue to compile
172
+
and run. Your IDE will show a deprecation warning with a suggested `ReplaceWith` quick-fix to
0 commit comments