getAllChallenges
🚀 getAllChallenges API
📘 Overview
The getAllChallenges
API in REL-ID SDK is designed to fetch all authentication challenges available for updating user credentials. It plays a crucial role in maintaining the security and integrity of user authentication flows by proactively managing credential updates.
The combination of getAllChallenges
and the onCredentialsAvailableForUpdate
event enables mobile applications to dynamically present and manage credential update options for users, thus offering a seamless and secure user experience.
🎯 Purpose
- 🛡 Retrieve authentication challenges for updating credentials.
- 🔐 Allow proactive or reactive credential updates to ensure ongoing account security.
- 📱 Enable applications to present relevant update options to users.
📱 UI Guidelines
The mobile app developer must present users with a screen displaying all available authentication challenges, such as Password, Pattern, or Security Questions. Users can select from these to initiate credential updates.
⚙️ API Flow Step-by-Step
- API Call: Invoke
getAllChallenges
with the user's unique ID. - SDK Response: Triggers
onCredentialsAvailableForUpdate
` event. - Developer Action: Present received options to the user for credential updates.
- User Action: User selects the desired credential type.
- Follow-up API Call: Developer invokes
initiateUpdateFlowForCredential
with the selected credential type. - Credential Update: Complete the specific update flow (e.g., password or security question update).
📥 Payload Fields
Field | Type | Description |
---|---|---|
userID | String | Unique ID of the user |
Return type
React Native, Flutter, Native Android : Error/Success Response
{
"error": {
"longErrorCode": 0,
"shortErrorCode": 0,
"errorString": "Success"
}
}
Native iOS - RDNAError
{
"longErrorCode": <INTEGER LONG ERROR CODE>,
"errorCode": <This enum (RDNAErrorID) specifies all the error codes which RDNA returns back to the client.>,
"errorString": "<ERROR MESSAGE>"
}
💬 Sample Code by Platform
React Native
RdnaClient.getAllChallenges(userID, (syncResponse) => {
console.log(syncResponse);
});
Flutter
rdnaClient.getAllChallenges(userID);
Cordova
com.uniken.rdnaplugin.RdnaClient.getAllChallenges(
successCallback,
errorCallback,
[userID]
);
Native Android
rdnaClient.getAllChallenges(userID, (syncResponse) => {});
Native iOS (Objective-C)
[rdnaInstance getAllChallenges:userID];
Updated 2 months ago