hrishikeshpaul/noq

Implement Security Questions During Forget / Reset Password

Closed this issue · 0 comments

As per the requirements, we should implement security questions when the user wants to reset or forgot password

This has to be done when the user is registering

An idea for the implementation - Make an array that has different options as questions:

user model: Add a field called - security_question: {type: Object}

securityQuestions = [ 
“What is your oldest cousin’s first name?,   
“What is the title and artist of your favorite song?, 
 “What was your favorite elementary school teacher’s name?",
"Who was your childhood hero?",
"What street did you live on in third grade?"
]

A user then selects one of these questions, and types the answer in the text field below, the make it a dict as shown below and save it in database

{
 security_question: {
    question: this.question,
    answer: this.answer
  }
}

Pass this on to the backend, and save it.