Where to Start
- Modify the following file:
nuMom/src/Components/SignUpPassword.jsx.
- You can modify and create any other files you may need.
- Download the list of poor passwords.
Requisites
- As the user is typing a password, have a Text component that changes style and value.
- There are three strengths:
Poor, Medium, High.
- The labels should have the following styles
{Poor: "nuMom-pink", Medium: "nuMom-blue", High: "#298000"}.
- Import nuMom colors from
nuMom/src/Components/AppStyles.js.
- If the password is
poor, the user cannot navigate to the next screen.
- If the password is
medium, the user get's a pop-up asking them to Edit password or Continure.
Poor (at least one is met) -- User should NOT be allowed to continue:
len(password) <= 4
- Password is included in this list.
- You can download the file to the app and import it.
Medium (all must be met) -- User can continue with registration:
len(password) >= 5
- Includes 3 out of 4 types:
lowercase letter, number, symbol, capital letter.
- Password is NOT included in this list.
- You can download the file to the app and import it.
High (all must be met) -- User can continue with registration:
len(password) >= 5
- Includes all 4 types:
lowercase letter, number, symbol, capital letter.
- Password is NOT included in this list.
- You can download the file to the app and import it.
Examples
password -> poor because it is included this list.
Password123 -> medium because it does not contain a symbol.
passWord123! -> strong because it meets the strength requirements.
P1n! -> poor because it's too short.
ajfudkl1 -> poor because it only includes two types: letter, number.
ajfudkl1! -> medium because it contains three types: letter, number, symbol.
Tips
- Create a
checkPasswordStrength(password) function that returns a number from 0 to 2 for each strength.
- Create a
passwordStrength state using useState() to keep track of the strength of the password as the user types.
- Whenever the user types a new character, check the strength using the
checkPasswordStrengthfunction.
- Add a component below the password input that changes style and text based on the value of
passwordStrength.
Where to Start
nuMom/src/Components/SignUpPassword.jsx.Requisites
Poor,Medium,High.{Poor: "nuMom-pink", Medium: "nuMom-blue", High: "#298000"}.nuMom/src/Components/AppStyles.js.poor, the user cannot navigate to the next screen.medium, the user get's a pop-up asking them toEditpassword orContinure.Poor (at least one is met) -- User should NOT be allowed to continue:
len(password) <= 4Medium (all must be met) -- User can continue with registration:
len(password) >= 5lowercase letter,number,symbol,capital letter.High (all must be met) -- User can continue with registration:
len(password) >= 5lowercase letter,number,symbol,capital letter.Examples
password-> poor because it is included this list.Password123-> medium because it does not contain a symbol.passWord123!-> strong because it meets the strength requirements.P1n!-> poor because it's too short.ajfudkl1-> poor because it only includes two types:letter,number.ajfudkl1!-> medium because it contains three types:letter,number,symbol.Tips
checkPasswordStrength(password)function that returns a number from 0 to 2 for each strength.passwordStrengthstate usinguseState()to keep track of the strength of the password as the user types.checkPasswordStrengthfunction.passwordStrength.