Systers, an AnitaB.org community

Add Password Confirmation functionality to Registration process (Mentorship - Backend)

Prerequisites:

Complete the task given here of setting up the mentorship-backend repository locally.

Outline of the task:

  • On POST/register, add a functionality for password confirmation
  • Add a new input field for entering 'Confirm Password'
  • Check if 'Password' and 'Confirm Password' are the same
  • If YES, perform SUCCESSFUL registration
  • If NO, return a new exception

Steps:

  1. Make the following changes locally (steps 2-4).
  2. In the register_user_api_model, add a new field for 'Confirm Password'. Models are available under this folder.
  3. In the 'messages.py', add a new ERROR message with key as 'PASSWORD_CONFIRMATION_MISMATCH' and value as ' The 2 password fields do not match. '
  4. In the Data Access Object(DAO) layer for User functionalities, add a condition to match the passwords under the 'create_user' function to create the User, otherwise, throw the ERROR message made above. DAOs are available under this folder
  5. Commit your changes using our Commit message Style Guide.
  6. Submit a Pull Request, against gci-dev branch, using the template against the listed issue.
  7. Submit a swagger screenshot of successful registration [#Screenshot 1] and a screenshot of unsuccessful registration because of passwords not being matched [#Screenshot 2].

Work Submission:

Submit a link to Pull Request (PR) created with the changes as listed in the GitHub issue, and the 2 screenshots

Resources:

Task tags

  • python
  • flask
  • mentorship-backend

Students who completed this task

_daksha_, asawesome07

Task type

  • code Code
close

2019