Secret Question and Answer

🔐 Secret Question and Answer (SQA): API Documentation

REL-ID SDK supports a secure flow for setting and validating a Secret Question and Answer (SQA). This is used as a secondary credential during:

  • Initial device activation (setup)
  • Additional device activation (validation)
  • Forgot Password

🛠️ Setup During Initial Activation

Triggered by the SDK to prompt the user to choose and answer a security question.

📦 Sample Payload

{
  "userID": "john.doe",
  "questionList": [
    { "questionID": 1, "question": "What is your pet's name?" },
    { "questionID": 2, "question": "What is your favorite color?" }
  ],
  "mode": 1
}
  • questionList: Available questions from REL-ID backend
  • mode = 1: Indicates credential setup phase (RDNA_OP_SETUP_CREDENTIALS)

Called by the application to submit the selected question and user-provided answer.

✅ Parameters

FieldTypeDescription
questionIDIntID of the selected question
answerStringUser's answer
modeIntShould be 1 during setup

🧪 Example (React Native)

RdnaClient.setSecretQuestionAnswer({
  questionID: 2,
  answer: "Blue",
  mode: 1
}, (syncResponse) => {
  console.log("SQA setup response", syncResponse);
});

🔐 Validation During Additional Device Activation

📤 3. getSecretAnswer (Event)

Triggered when the SDK requests the user to validate their identity using a previously set SQA.

📦 Sample Payload

{
  "userID": "john.doe",
  "questionID": 2,
  "question": "What is your favorite color?",
  "mode": 2
}
  • mode = 2: Indicates credential validation during ADA (RDNA_OP_VALIDATE_CREDENTIALS)

📥 4. setSecretQuestionAnswer() (Validation)

Used again to validate the answer with mode = 2.

🧪 Example

RdnaClient.setSecretQuestionAnswer({
  questionID: 2,
  answer: "Blue",
  mode: 2
}, (syncResponse) => {
  console.log("SQA validation result", syncResponse);
});

🧭 Summary Flow

flowchart TD
    A[Activation Begins] --> B[SDK triggers onSelectSecretQuestionAnswer Event]
    B --> C[User selects Q and enters A]
    C --> D[App calls setSecretQuestionAnswer, mode:1]
    D --> E[SQA setup complete]

    F[Additional Device Activation Begins] --> G[SDK triggers getSecretAnswer Event]
    G --> H[User provides answer]
    H --> I[App calls setSecretQuestionAnswer, mode:2]
    I --> J[Answer validated, activation continues]

📌 Note: SQA data is securely managed by the SDK and not exposed or stored in the app. Use mode value 1 for setup and 2 for validation.