-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Password requirements message #4582
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Password requirements message #4582
Conversation
update to 2.3.7
updating to 2.3.8
Added a custom passwordRequirementsHumanErrorMessage and clarified the reason for username containing fails
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR, can you please address the failing tests and the small recommended nit?
@@ -319,7 +319,8 @@ var server = ParseServer({ | |||
// 1. a RegExp object or a regex string representing the pattern to enforce | |||
validatorPattern: /^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.{8,})/, // enforce password with at least 8 char with at least 1 lower case, 1 upper case and 1 digit | |||
// 2. a callback function to be invoked to validate the password | |||
validatorCallback: (password) => { return validatePassword(password) }, | |||
validatorCallback: (password) => { return validatePassword(password) }, | |||
passwordRequirementsHumanErrorMessage: 'Password must contain a capital letter, lowercase letter, a number and be at least 8 characters long.', //This error message is sent instead of the generic "Password does not meet the Password Policy requirements." message. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we rename to validationError
?
Codecov Report
@@ Coverage Diff @@
## master #4582 +/- ##
==========================================
+ Coverage 92.62% 92.87% +0.24%
==========================================
Files 119 118 -1
Lines 8558 8489 -69
==========================================
- Hits 7927 7884 -43
+ Misses 631 605 -26
Continue to review full report at Codecov.
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Pain: From the generic "password reset" page there is no way for the user to see the password requirements and the generic error leads to frustration.
Solution: I added a custom error message that the programmer can place in the config file that explains the requirements in human words.