|
| 1 | +# Migration Guide |
| 2 | + |
| 3 | +## Native SDK Version Updates |
| 4 | + |
| 5 | +This release includes updates to the underlying native Auth0 SDKs to support new features including DPoP (Demonstrating Proof of Possession). These updates are **transparent** to your application code - no code changes are required unless you want to opt into new features like DPoP. |
| 6 | + |
| 7 | +### Updated SDK Versions |
| 8 | + |
| 9 | +| Platform | Previous Version | New Version | Changes | |
| 10 | +|----------|-----------------|-------------|---------| |
| 11 | +| **Android** | Auth0.Android 2.11.0 | Auth0.Android 3.11.0 | DPoP support, **biometric auth requires FlutterFragmentActivity** | |
| 12 | +| **iOS/macOS** | Auth0.swift 2.10.0 | Auth0.swift 2.14.0 | DPoP support, improved APIs | |
| 13 | +| **Web** | auth0-spa-js 2.0 | auth0-spa-js 2.9.0 | DPoP support, bug fixes | |
| 14 | + |
| 15 | +### What's New |
| 16 | + |
| 17 | +#### DPoP (Demonstrating Proof of Possession) Support |
| 18 | +All platforms now support DPoP, an optional OAuth 2.0 security extension that cryptographically binds access tokens to your client, preventing token theft and replay attacks. |
| 19 | + |
| 20 | +**This is an opt-in feature** - your existing authentication flows will continue to work without any changes. |
| 21 | + |
| 22 | +To enable DPoP: |
| 23 | +```dart |
| 24 | +// Mobile |
| 25 | +final credentials = await auth0.webAuthentication().login(useDPoP: true); |
| 26 | +
|
| 27 | +// Web |
| 28 | +final auth0Web = Auth0Web('DOMAIN', 'CLIENT_ID', useDPoP: true); |
| 29 | +``` |
| 30 | + |
| 31 | +For complete DPoP documentation, see the [README](README.md#using-dpop-demonstrating-proof-of-possession). |
| 32 | + |
| 33 | +### Do I Need to Make Changes? |
| 34 | + |
| 35 | +**Most users do not need to make changes.** However, there is one breaking change that affects users of biometric authentication on Android. |
| 36 | + |
| 37 | +#### ⚠️ Breaking Change: Android Biometric Authentication |
| 38 | + |
| 39 | +**If you use biometric authentication on Android**, your `MainActivity.kt` must now extend `FlutterFragmentActivity` instead of `FlutterActivity`. |
| 40 | + |
| 41 | +This requirement comes from Auth0.Android SDK 3.x, which changed its biometric authentication implementation. |
| 42 | + |
| 43 | +**Who is affected:** |
| 44 | +- ✅ Users who call `credentialsManager.credentials()` with `localAuthentication` parameter |
| 45 | +- ✅ Only on Android platform |
| 46 | +- ✅ Only if your `MainActivity.kt` currently extends `FlutterActivity` |
| 47 | + |
| 48 | +**Required change:** |
| 49 | + |
| 50 | +```kotlin |
| 51 | +// Before (will cause error) |
| 52 | +import io.flutter.embedding.android.FlutterActivity |
| 53 | + |
| 54 | +class MainActivity: FlutterActivity() { |
| 55 | +} |
| 56 | + |
| 57 | +// After (required for biometric auth) |
| 58 | +import io.flutter.embedding.android.FlutterFragmentActivity |
| 59 | + |
| 60 | +class MainActivity: FlutterFragmentActivity() { |
| 61 | +} |
| 62 | +``` |
| 63 | + |
| 64 | +**If you don't use biometric authentication,** no changes are needed. |
| 65 | + |
| 66 | +#### Optional New Features |
| 67 | + |
| 68 | +You only need to make changes if you want to: |
| 69 | +- ✅ Enable DPoP for enhanced security (optional) |
| 70 | +- ✅ Use new DPoP API methods: `getDPoPHeaders()` and `clearDPoPKey()` (optional) |
| 71 | + |
| 72 | +### Java Version Requirement (Android) |
| 73 | + |
| 74 | +**Java 8** remains the minimum requirement for Android builds. The SDK continues to use: |
| 75 | +- `sourceCompatibility JavaVersion.VERSION_1_8` |
| 76 | +- `targetCompatibility JavaVersion.VERSION_1_8` |
| 77 | + |
| 78 | +No changes to your Java setup are needed. |
| 79 | + |
| 80 | +## What's New |
| 81 | + |
| 82 | +This version includes support for **DPoP (Demonstrating Proof of Possession)**, an optional OAuth 2.0 security feature that cryptographically binds access tokens to a specific client. DPoP is completely opt-in and your existing authentication flows will continue to work without any modifications. |
| 83 | + |
| 84 | +For detailed DPoP usage instructions, see the [README DPoP section](README.md#using-dpop-demonstrating-proof-of-possession). |
0 commit comments