onSelectSecretQuestionAnswer
Setting the Secret Question and Answer
đonSelectSecretQuestionAnswer
Event
onSelectSecretQuestionAnswer
EventThe onSelectSecretQuestionAnswer
event is triggered by the REL-ID SDK during first-time activation or registration. It prompts the application to ask the user to choose a secret question from a predefined list and provide an answer. This information is used for identity verification in future authentication scenarios.
đ Purpose
This event facilitates setting up fallback authentication by allowing users to select and answer secret questions. The SDK expects the application to collect this information and call the corresponding API to submit it. The secret questions and how many questions user should answer will be configured in the Gateway Manager by REL-ID Admin.
đĽ Sample Payload
Click to expand the sample payload
{
"userID": "testuser",
"challengeResponse": {
"status": {
"statusCode": 100,
"statusMessage": ""
},
"session": {
"sessionType": 0,
"sessionID": "SESSION_ID_STRING"
},
"additionalInfo": {
"DNAProxyPort": 0,
"isAdUser": 0,
"isDNAProxyLocalHostOnly": 0,
"JWT": "",
"accessTokenInfo": "",
"settings": "",
"configSettings": "",
"loginIDs": [],
"currentWorkFlow": "FirstTimeUserActivation"
},
"challengeInfo": [
{ "key": "Prompt label", "value": "Secret Question" },
{ "key": "Response label", "value": "Secret Answer" },
{ "key": "Description", "value": "Choose your secret question and then provide answer" },
{ "key": "Reading", "value": "Set secret question and answer" }
]
},
"questionsToSet": [
[
"What is your nickname?",
"What is the name of your mother?",
"What is the name of your father?",
"What is the name of your sister?",
"What is the name of your brother?"
]
],
"challengeMode": 1,
"numberOfQuestionsToSet": 1,
"error": {
"longErrorCode": 0,
"shortErrorCode": 0,
"errorString": "Success"
}
}
đ§ž Field Descriptions
Field | Description |
---|---|
userID | Unique identifier for the user undergoing activation. |
challengeResponse.statusCode | Numeric code indicating the result of the current operation (e.g. 100 = Success). |
challengeResponse.statusMessage | Descriptive status message (may be empty on success). |
session.sessionType | Integer representing the session type (0 = App session). |
session.sessionID | Unique session identifier. |
additionalInfo.currentWorkFlow | Indicates the current operation (e.g., FirstTimeUserActivation). |
challengeInfo | List of key/value instructions for displaying UI. |
questionsToSet | A nested array of strings containing the available secret questions. |
challengeMode | Challenge display mode; typically handled by the app (value = 1). |
numberOfQuestionsToSet | Number of questions the user must set (typically 1). |
error.errorString | Descriptive error message (e.g., âSuccessâ). |
đŹ Developer Responsibilities
As a developer, you must:
- Display the questions from
questionsToSet
to the user. - Prompt the user to select one and provide an answer.
- Call
setSelectSecretQuestionAnswer(question, answer)
to submit the input.
Updated 2 months ago