activateUserOption
🔐 REL-ID SDK Event: activateUserOption
activateUserOption🧭 Overview
The activateUserOption event is triggered by the REL-ID SDK during the device activation process. It provides the application with a list of authentication methods that the user can choose from to complete the device activation.
Once an option is selected by the user (e.g., Password, Fingerprint, Pattern), the app must invoke the corresponding activateUsing(<AUTHENTICATION_TYPE>) API to initiate the challenge for that method.
🧪 Purpose
- To prompt the user to select their preferred authentication method.
- To launch the proper challenge screen (password input, biometric, etc.)
- Ensures secure user consent during first or additional device activation.
🧭 When is activateUserOption Triggered?
It typically occurs:
- After the user's identity has been verified through a primary method (e.g., setPassword or performVerifyAuth)
- Before device registration is finalized (before getDeviceName / onDeviceActivated)
- When the SDK wants the user to confirm their authentication method for enabling LDA (Local Device Authentication) — like Fingerprint, Pattern, or Password for future unlocks
🧩 Sample Payload
{
"userID": "testuser",
"newUserOptions": ["FingerPrint", "Pattern", "Password"],
"challengeInfo": [
{ "key": "Response label", "value": "Password" },
{ "key": "description", "value": "Enter password of length 8-10 characters" },
{ "key": "SDK_CHLNG", "value": "YES" },
{ "key": "SDK_CHLNG_MODE", "value": "SEMIAUTO" },
{ "key": "PASSWORD_POLICY", "value": "{"minL":8,"maxL":16,"minLc":1,"minDg":1,"minUc":1,"minSc":1,"Repetition":2,"UserIDcheck":"true","msg":"Password must contain 8-16 characters, including at least 1 uppercase, 1 lowercase, 1 number and special characters"}" },
{ "key": "IS_USER_PASS", "value": "true" },
{ "key": "ENABLE_FORGOT_PASSWORD", "value": "true" },
{ "key": "PASS_EXP_TS", "value": "1643291663000" },
{ "key": "MIN_PASS_AGE_TS", "value": "" },
{ "key": "DEV_MGMT_COOL_TS", "value": "-1" }
]
}🧠 Fields Explained
| Field | Description |
|---|---|
userID | REL-ID user attempting activation |
newUserOptions | List of available authentication methods (e.g., Password, FingerPrint) |
challengeInfo | Supplementary information like password policies and SDK flags |
Challenge Info Keys
| Key | Meaning |
|---|---|
Response label | Text to display on the button (e.g., "Password") |
description | Instructional message to show with the challenge |
SDK_CHLNG | If "YES", means SDK will perform a local challenge |
SDK_CHLNG_MODE | How the challenge is presented (e.g., AUTO, SEMIAUTO) |
PASSWORD_POLICY | JSON describing password complexity rules |
ENABLE_FORGOT_PASSWORD | Indicates if "Forgot Password" should be shown |
🛠️ Developer Responsibilities
- Listen to
activateUserOptionevent in your app. - Display
newUserOptionsto the user. - Upon selection, call the API
activateUsing
RdnaClient.activateUsing("Password"); // or FingerPrint, Pattern🛠️ REL-ID SDK API: activateUsing
activateUsing🧭 Overview
The activateUsing API is used in response to the activateUserOption event. It initiates a local challenge such as password, fingerprint, or pattern based on the user’s selection. This step is crucial for configuring Local Device Authentication (LDA) for the current device during the activation process.
🎯 Purpose
- Finalizes the authentication method the user wants to use on this device.
- Ensures secure local unlock for future sessions.
- Completes user consent for enabling on-device authentication.
🔁 When to Use
- After receiving the
activateUserOptionevent. - Once the user selects an option from
newUserOptions(e.g.,"Password","FingerPrint","Pattern"). - App calls
activateUsing("option")to confirm and activate that challenge type.
🧩 Supported Authentication Types
| Type | Description |
|---|---|
"Password" | Text-based user password entry |
"FingerPrint" | Device's native fingerprint reader |
"Pattern" | Custom gesture-based unlock pattern |
These are determined by the values present in newUserOptions.
🔧 API: activateUsing(optionType)
activateUsing(optionType)📥 Parameter
| Parameter | Type | Required | Description |
|---|---|---|---|
optionType | String | ✅ | Authentication type chosen by user |
💻 Code Snippets
React Native
RdnaClient.activateUsing("Password", (response) => {
console.log("Activated using selected option:", response);
});Flutter
rdnaClient.activateUsing("FingerPrint");Cordova
com.uniken.rdnaplugin.RdnaClient.activateUsing(
() => console.log("Activated"),
(err) => console.error("Failed", err),
["Pattern"]
);Android
rdnaClient.activateUsing("Password");iOS (Objective-C)
[client activateUsing:@"Password"];✅ On Success
- Selected LDA method is stored and configured for the device.
- SDK proceeds to the next activation step (
getDeviceName→setDeviceName).
❌ On Failure
- SDK may re-emit
activateUserOptionto let user retry or choose a different method. - App should inform the user and allow a fallback path.
💻 Code Snippets
React Native
rdnaEventRegistery.addListener('activateUserOption', (event) => {
const options = event.newUserOptions;
const challengeInfo = event.challengeInfo;
// Show these options to user, then on selection:
RdnaClient.activateUsing("Password");
});Flutter
rdnaClient.on(RdnaClient.activateUserOptions, (response) {
final options = response.newUserOptions;
rdnaClient.activateUsing("Password");
});Cordova
document.addEventListener('activateUserOption', function(event) {
const options = event.newUserOptions;
activateUsing("Password");
});iOS (Objective-C)
[rdnaClient activateUserOptions:userID options:options info:info];Android (Java)
rdnaClient.activateUsing("Password");✅ On Success
- SDK moves to corresponding challenge screen.
- User completes authentication and proceeds with device activation.
❌ On Failure
- If authentication fails, SDK may re-trigger
activateUserOptionor fail activation. - App should allow retry or show fallback options.
Updated 6 months ago
