Skip to content
Merged
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
37 changes: 37 additions & 0 deletions EXAMPLES.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -2239,6 +2240,42 @@ myAccountClient.deleteAuthenticationMethod("phone|dev_...")
</details>



### 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<Unit, MyAccountException> {
override fun onSuccess(result: Unit) {
// Deletion successful
}
override fun onFailure(error: MyAccountException) { }
})
```
<details>
<summary>Using Java</summary>

```java
myAccountClient.updateAuthenticationMethodById("{Authentication_Id}", "{Name}")
.start(new Callback<Void, MyAccountException>() {
@Override
public void onSuccess(Void result) {
// Deletion successful
}
@Override
public void onFailure(@NonNull MyAccountException error) { }
});
```
</details>


## Credentials Manager

### Secure Credentials Manager
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -364,13 +364,13 @@ 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)
*
*/
@JvmOverloads
internal fun updateAuthenticationMethodById(
public fun updateAuthenticationMethodById(
authenticationMethodId: String,
authenticationMethodName: String? = null,
preferredAuthenticationMethod: PhoneAuthenticationMethodType? = null
Expand Down
Loading