Account creation: Password generation
RAvengineer opened this issue · comments
Recent testing with the massive account creation process brought few wild bugs into the light.
A few of the bugs were, API not responding, irregular password lengths. This disabled logging in for few users, thus, the admins had to create new accounts to fix the issue.
Though this problem doesn't happen for most of the users, however, it did happen. Hence, needs to be fixed.
A possible way to solve this problem would be as follows,
- Modify the function in helper.js to generate Password
- Take parameters -> length, minLetters, minSymbols, minDigits
- Keep a list/array of Letters & Digits to choose from, which shouldn't contain ambiguous characters like
O
&0
- Keep a list/array of Symbols/Special characters, which should only contain keyboard characters
- Use
Math.random()
to select elements from the above lists/arrays & create a resultant string - Return the resultant string ie. password
Fixed by commit 61218ed made by @ishivanshgoel