From 9faedb6cbe993bf5bb7206e12a8a249a21509780 Mon Sep 17 00:00:00 2001 From: Prince Mathew Date: Mon, 6 Apr 2026 13:01:15 +0530 Subject: [PATCH 1/3] refactor : Made the updateAuthenticationMethodById public --- .../main/java/com/auth0/android/myaccount/MyAccountAPIClient.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/auth0/src/main/java/com/auth0/android/myaccount/MyAccountAPIClient.kt b/auth0/src/main/java/com/auth0/android/myaccount/MyAccountAPIClient.kt index a8b9447c7..0770bde5d 100644 --- a/auth0/src/main/java/com/auth0/android/myaccount/MyAccountAPIClient.kt +++ b/auth0/src/main/java/com/auth0/android/myaccount/MyAccountAPIClient.kt @@ -370,7 +370,7 @@ public class MyAccountAPIClient @VisibleForTesting(otherwise = VisibleForTesting * */ @JvmOverloads - internal fun updateAuthenticationMethodById( + public fun updateAuthenticationMethodById( authenticationMethodId: String, authenticationMethodName: String? = null, preferredAuthenticationMethod: PhoneAuthenticationMethodType? = null From 4e79a9e7644ad957e2f39d4ee31c637d3ac19523 Mon Sep 17 00:00:00 2001 From: Prince Mathew Date: Mon, 6 Apr 2026 13:08:11 +0530 Subject: [PATCH 2/3] Minor doc change --- .../main/java/com/auth0/android/myaccount/MyAccountAPIClient.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/auth0/src/main/java/com/auth0/android/myaccount/MyAccountAPIClient.kt b/auth0/src/main/java/com/auth0/android/myaccount/MyAccountAPIClient.kt index 0770bde5d..0a71b1f66 100644 --- a/auth0/src/main/java/com/auth0/android/myaccount/MyAccountAPIClient.kt +++ b/auth0/src/main/java/com/auth0/android/myaccount/MyAccountAPIClient.kt @@ -364,7 +364,7 @@ public class MyAccountAPIClient @VisibleForTesting(otherwise = VisibleForTesting * }) * ``` * - * @param authenticationMethodId Id of the authentication method to be retrieved + * @param authenticationMethodId Id of the authentication method to be updated * @param authenticationMethodName The friendly name of the authentication method * @param preferredAuthenticationMethod The preferred authentication method for the user. (for phone authenticators) * From 5a4bb9afc11cbd06bac315a11b052756d173e6ff Mon Sep 17 00:00:00 2001 From: Prince Mathew Date: Mon, 6 Apr 2026 13:37:45 +0530 Subject: [PATCH 3/3] Updated the examples --- EXAMPLES.md | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/EXAMPLES.md b/EXAMPLES.md index a6bb1a615..12e2e4bca 100644 --- a/EXAMPLES.md +++ b/EXAMPLES.md @@ -43,6 +43,7 @@ - [Enroll a Recovery Code](#enroll-a-recovery-code) - [Verify an Enrollment](#verify-an-enrollment) - [Delete an Authentication Method](#delete-an-authentication-method) + - [Update an Authentication Method](#update-an-authentication-method) - [Credentials Manager](#credentials-manager) - [Secure Credentials Manager](#secure-credentials-manager) - [Usage](#usage) @@ -2239,6 +2240,42 @@ myAccountClient.deleteAuthenticationMethod("phone|dev_...") + +### Update an Authentication Method +**Scopes required:** `update:me:authentication_methods` + +Updates a single authentication method. + +**Prerequisites:** + +The user must have the specific authentication method (identified by its ID) already enrolled. + +```kotlin +myAccountClient.updateAuthenticationMethodById("{Authentication_Id}", "{Name}") + .start(object : Callback { + override fun onSuccess(result: Unit) { + // Deletion successful + } + override fun onFailure(error: MyAccountException) { } + }) +``` +
+ Using Java + +```java +myAccountClient.updateAuthenticationMethodById("{Authentication_Id}", "{Name}") + .start(new Callback() { + @Override + public void onSuccess(Void result) { + // Deletion successful + } + @Override + public void onFailure(@NonNull MyAccountException error) { } + }); +``` +
+ + ## Credentials Manager ### Secure Credentials Manager