onTOTPRegistrationStatus
🟢 REL-ID SDK Event: onTOTPRegistrationStatus
onTOTPRegistrationStatus🧭 Overview
The onTOTPRegistrationStatus event is emitted by the REL-ID SDK to notify the app about the success or failure of TOTP registration for a user. This typically occurs during user login or device activation.
🎯 Purpose
- To confirm that a user has been successfully registered for TOTP.
- To allow the app to respond to registration failure and take appropriate actions (e.g., re-login, retry).
🔁 When Triggered
This event is triggered automatically by the SDK:
- After a TOTP registration attempt is made in the background (as part of login/activation)
- Whether the result is success or failure
📦 Sample Payload
{
"userID": "testuser",
"OpMode": 0,
"ldaType": 1,
"status": {
"statusCode": 100,
"statusMessage": "Success"
},
"error": {
"longErrorCode": 0,
"shortErrorCode": 0,
"errorString": "Success"
}
}📥 Payload Fields
| Field | Type | Description |
|---|---|---|
userID | String | Username associated with the registration |
OpMode | Int | Operation mode (e.g., 0 = Register) |
ldaType | Int | Type of LDA used |
status | Object | Contains statusCode and statusMessage |
error | Object | Contains longErrorCode, shortErrorCode, errorString |
💻 Platform Usage
React Native
rdnaEventRegistery.addListener(
"onTOTPRegistrationStatus",
this.onTOTPRegistrationStatus.bind(this)
);Flutter
rdnaClient.on(RdnaClient.onTOTPRegistrationStatus, (response) {
print("TOTP Registration Status: ${response.error.errorString}");
});Cordova
document.addEventListener("onTOTPRegistrationStatus", function(e) {
console.log("TOTP Registration Status:", e);
});iOS (Objective-C)
(void)onTOTPRegistrationStatus:(RDNAError *)error;Android
void onTOTPRegistrationStatus(RDNAError error);✅ On Success
- SDK internally sets up TOTP profile
- App may proceed to generate TOTP (if needed)
❌ On Failure
- Check
errorStringandstatus.statusCode - og the error or show feedback to the user
Updated 6 months ago
