Skip to content

Commit 464aefa

Browse files
committed
updated the migration guide
1 parent acf10a4 commit 464aefa

1 file changed

Lines changed: 22 additions & 0 deletions

File tree

V4_MIGRATION_GUIDE.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ v4 of the Auth0 Android SDK includes significant build toolchain updates, update
2222
- [**Behavior Changes**](#behavior-changes)
2323
+ [clearCredentials() Now Clears All Storage](#clearCredentials-now-clears-all-storage)
2424
+ [Storage Interface: New removeAll() Method](#storage-interface-new-removeall-method)
25+
- [**New APIs**](#new-apis)
26+
+ [clearAll() — Full Credential and Key Cleanup](#clearall--full-credential-and-key-cleanup)
2527
- [**Dependency Changes**](#dependency-changes)
2628
+ [Gson 2.8.9 → 2.11.0](#️-gson-289--2110-transitive-dependency)
2729
+ [DefaultClient.Builder](#defaultclientbuilder)
@@ -226,6 +228,26 @@ In v4, `clearCredentials()` calls `Storage.removeAll()`, which clears **all** va
226228

227229
**Impact:** Existing custom `Storage` implementations will continue to compile and work without changes. Override `removeAll()` to provide the actual clearing behavior if your custom storage is used with `clearCredentials()`.
228230

231+
## New APIs
232+
233+
### `clearAll()` — Full Credential and Key Cleanup
234+
235+
v4 introduces a new `clearAll()` method on `CredentialsManager` and `SecureCredentialsManager` that performs a complete cleanup of all stored credentials **and** cryptographic key pairs.
236+
237+
**Usage:**
238+
239+
```kotlin
240+
// Clear everything on logout — credentials, DPoP keys, and encryption keys
241+
credentialsManager.clearAll()
242+
```
243+
244+
**When to use `clearAll()` vs `clearCredentials()`:**
245+
246+
- Use **`clearCredentials()`** when you only need to remove stored tokens (e.g., forcing a re-login) but want to preserve cryptographic keys for future sessions.
247+
- Use **`clearAll()`** on full logout or account removal, when you want to ensure no credentials or key material remain on the device.
248+
249+
> **Note:** `clearAll()` catches any errors from DPoP key pair deletion internally, so it will not throw even if the DPoP key pair was never created or has already been removed.
250+
229251
## Dependency Changes
230252

231253
### ⚠️ Gson 2.8.9 → 2.11.0 (Transitive Dependency)

0 commit comments

Comments
 (0)