Resend OTP
š Resend OTP
Allow user to resend OTP if ENABLE_RESEND_ACTIVATION_CODE in the challengeInfo received in payload of getActivationCode callback is set to true
š Use Case
- User fails to receive an activation code during onboarding or device registration.
- User wants to retry without restarting the process.
š resendActivationCode API
resendActivationCode APIThe resendActivationCode API is used when the user has not received their activation code (OTP) via email or SMS and requests a new one.
Calling this method sends a new OTP to the user and triggers a new getActivationCode event
š± Platform-specific Usage - resendActivationCode
š React Native
RdnaClient.resendActivationCode((syncResponse) => {
console.log("Resend result:", syncResponse);
});š£ Flutter
rdnaClient.resendActivationCode();š§© Cordova
com.uniken.rdnaplugin.RdnaClient.resendActivationCode(
() => console.log("OTP resent"),
(err) => console.log("Resend failed", err)
);š iOS (Objective-C)
RDNAError *error = [rdnaInstance resendActivationCode];š¤ Android (Java)
RDNAError error = rdna.resendActivationCode();š What Happens Next?
- The SDK will retrigger the
getActivationCodeevent. - Your app will receive new:
verificationKeyattemptsLeft- Updated
challengeInfo
š¤ Return Type
| Platform | Return Type |
|---|---|
| React Native | sync callback |
| Flutter | void (async call) |
| Cordova | success/error callback |
| iOS | RDNAError * |
| Android | RDNA.RDNAError |
ā ļø Notes
- Ensure the user is eligible for OTP resend (based on app flow or
ENABLE_RESEND_ACTIVATION_CODEflag). - Resend intervals or limits may apply (as configured server-side).
- Typically used from the OTP input screen.
ā
Best Practices
- Prompt user clearly for OTP input.
- Use
attemptsLeftto guide retry attempts. - Handle all responses and errors gracefully.
Updated 9 months ago
