onUpdateCredentialResponse

📤 onUpdateCredentialResponse Event

On successful updation of either password/ pattern or fingerprint, SDK node module will invoke this event to notify the updation flow is completed.


Sample Payload

{
    "userID": "ad3",
    "credType": "Password",
    "status": {
        "statusCode": 100,
        "statusMessage": "Credential updated successfully"
    },
    "error": {
        "longErrorCode": 0,
        "shortErrorCode": 0,
        "errorString": "Success"
    }
}
FieldDescription
userIDLogged in user's user id for which the credential was updated
credTypeCredential that was updated
errorOutcome of the operation (code/message)
statusRequest status indicating the status of update request (code/message)

Code Snippets

React Native
let onUpdateCredentialResponseSubscription = rdnaEventRegistery.addListener(
  'onUpdateCredentialResponse',
  this.onUpdateCredentialResponse.bind(this)
);

onUpdateCredentialResponse(response) {
  console.log("Update Credential Response:", response);
  // handle success or failure
}
Flutter
rdnaClient.on(RdnaClient.onUpdateCredentialResponse, onUpdateCredentialResponse);

void onUpdateCredentialResponse(RDNAUpdateCredentialStatus response) {
  print("Update Credential Response: ${response.toJson()}");
  // handle response
}
Cordova
document.addEventListener(
  'onUpdateCredentialResponse',
  this.onUpdateCredentialResponse.bind(this),
  false
);

onUpdateCredentialResponse(response) {
  console.log("Update Credential Response:", response);
  // handle update logic
}
Native Android
@Override
public void onUpdateCredentialResponse(String userId, String credType,
                                       RDNARequestStatus requestStatus, RDNAError error) {
    Log.d("REL-ID", "User ID: " + userId + ", Credential Type: " + credType);
    Log.d("REL-ID", "Request Status: " + requestStatus.toString());
    Log.d("REL-ID", "Error: " + (error != null ? error.getErrorString() : "None"));
    // handle result
}
Native iOS (Objective-C)
- (void)onUpdateCredentialResponse:(NSString *)userID
                          credType:(NSString *)credType
                            status:(RDNARequestStatus *)status
                             error:(RDNAError *)error {
    NSLog(@"User ID: %@", userID);
    NSLog(@"Credential Type: %@", credType);
    NSLog(@"Request Status: %@", status);
    NSLog(@"Error: %@", error);
    // handle response
}