Skip to content

Add password checks for registration#54

Merged
YashK2005 merged 4 commits intomainfrom
add_password_checks_for_registration
Sep 26, 2025
Merged

Add password checks for registration#54
YashK2005 merged 4 commits intomainfrom
add_password_checks_for_registration

Conversation

@e1011
Copy link
Collaborator

@e1011 e1011 commented Sep 22, 2025

Notion ticket link

No link

Implementation description

The backend user schema was modified to return an array of requirements that the password does not meet rather than just raising the first one, with updated requirements as well. The authApiClient was modified to handle 422 errors and parse this list of errors. The participant form frontend was modified check if there is an error before running router.push(), and to loop over the errors to display the requirement list. In the future we can make this change to admin page as well.

Steps to test

On the registration page enter a password which does not fit the requirements. Instead of allowing you to proceed, it should show a checklist of requirements the password must meet. This should match the figma design: https://www.figma.com/design/HhFPmxFewSCBLGkIt9RZen/LLSC-Main-Design-File?node-id=6082-14924&t=xlyQNnm2i6cO0ct6-0

What it looks like

Image 2025-09-21 at 11 53 PM

Backend tests

Tests in user_schema_test.py handle password requirement logic and all of them should pass
Image 2025-09-22 at 11 18 AM

What should reviewers focus on?

Checklist

  • My PR name is descriptive and in imperative tense
  • My commit messages are descriptive and in imperative tense. My commits are atomic and trivial commits are squashed or fixup'd into non-trivial commits
  • I have run the appropriate linter(s)
  • I have requested a review from the PL, as well as other devs who have background knowledge on this PR or who will be building on top of this PR

@e1011 e1011 requested a review from YashK2005 September 22, 2025 15:40
@e1011 e1011 force-pushed the add_password_checks_for_registration branch from 3405840 to 0f04d27 Compare September 22, 2025 15:45
Copy link
Collaborator

@YashK2005 YashK2005 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work, this is much better than what we had before!

@YashK2005 YashK2005 merged commit 94a3832 into main Sep 26, 2025
5 checks passed
@YashK2005 YashK2005 deleted the add_password_checks_for_registration branch September 26, 2025 22:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants