Enable users to recover their accounts using multiple recovery options such as email, SMS, and security questions. This feature will improve user experience by offering a flexible and secure way to regain access to their accounts.
Acceptance Criteria
Users can set up multiple account recovery options, including email, SMS, and security questions.
Users can recover their accounts using any of the configured recovery options.
The recovery process is secure and prevents unauthorized access.
Implement proper error handling and validation for recovery information.
Ensure the recovery options adhere to best practices for security and user experience.
Purpose
The goal is to provide users with various methods to recover their accounts, enhancing both security and user experience. By offering multiple recovery options, users can choose the most convenient and secure method for them.
Requirements
Implement a RESTful Endpoint for Account Recovery Setup
Ensure the endpoint allows users to configure and manage their recovery options.
Implement a RESTful Endpoint for Account Recovery
Ensure the endpoint validates and processes recovery requests based on the configured recovery options.
Follow best practices for RESTful API design and security
Write Unit and End-to-End Tests
Endpoints
URL
1. ADD RECOVERY EMAIL
/api/v1/account/add-recovery-email
METHOD
POST
Request Body
email (required): The recovery email to be added to the user account for account recovery.
{
"message": "Security Questions",
"status_code": 200,
"data": {
"question_1": "What is your mother's maiden name?",
"question_2": "In what city were you born?",
"question_3": "What is the name of your first pet?",
}
}
{
"answers": [
{
"question_1": "What is your mother's maiden name?",
"answer_1": "User's Answer"
},
{
"question_2": "In what city were you born?",
"answer_2": "User's Answer"
},
{
"question_3": "What is the name of your first pet?",
"answer_3": "User's Answer"
}
]
}
{
"email": "newemail@example.com",
"phone_number": "09012345678",
"security_questions": [
{
"question_1": "What is your mother's maiden name?",
"answer_1": "New Answer"
},
{
"question_2": "In what city were you born?",
"answer_2": "New Answer"
},
{
"question_3": "What is the name of your first pet?",
"answer_3": "New Answer"
}
]
}
Description
Enable users to recover their accounts using multiple recovery options such as email, SMS, and security questions. This feature will improve user experience by offering a flexible and secure way to regain access to their accounts.
Acceptance Criteria
Purpose
The goal is to provide users with various methods to recover their accounts, enhancing both security and user experience. By offering multiple recovery options, users can choose the most convenient and secure method for them.
Requirements
Endpoints
URL
1. ADD RECOVERY EMAIL
METHOD
Request Body
email (required):
The recovery email to be added to the user account for account recovery.RESPONSE
Success Response (json)
Error Response (json)
2. DISPLAY SECURITY QUESTIONS
METHOD
RESPONSE
Success Response (json)
Error Response (json)
3. SUBMIT ANWSERS TO SECURITY QUESTIONS
METHOD
Request Body
RESPONSE
Success Response (json)
Error Response (json)
4. ADD RECOVERY PHONE NUMBER
METHOD
Request Body
recovery-number (required):
The recovery phone number to be added to the user account for account recovery.RESPONSE
Success Response (json)
Error Response (json)
5. UPDATE RECOVERY OPTIONS
METHOD
Request Body
RESPONSE
Success Response (json)
Error Response (json)
6. DELETE RECOVERY OPTIONS
METHOD
Request Body
RESPONSE
Success Response (json)
Error Response (json)
TASK
Expected Outcome