-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
feat: Add Parse Server option resetPasswordSuccessOnInvalidEmail
to choose success or error response on password reset with invalid email
#7551
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
Merged
Merged
Changes from 38 commits
Commits
Show all changes
41 commits
Select commit
Hold shift + click to select a range
9ef1968
ci: fix node engine check (#7891)
mtrezza f63fb2b
fix: return correct response when revert is used in beforeSave (#7839)
dblythy b3199d7
chore(release): 5.2.1-alpha.1 [skip ci]
semantic-release-bot 48bd512
perf: reduce database operations when using the constant parameter in…
dblythy e0cca58
chore(release): 5.2.1-alpha.2 [skip ci]
semantic-release-bot 90155cf
feat: add MongoDB 5.1 compatibility (#7682)
github-actions[bot] 499cead
chore(release): 5.3.0-alpha.1 [skip ci]
semantic-release-bot ef56e98
fix: security upgrade parse push adapter from 4.1.0 to 4.1.2 (#7893)
mtrezza 119dbe0
chore(release): 5.3.0-alpha.2 [skip ci]
semantic-release-bot 6b4b358
feat: add MongoDB 5.2 support (#7894)
mtrezza 75eca2d
chore(release): 5.3.0-alpha.3 [skip ci]
semantic-release-bot 61ef23f
Merge remote-tracking branch 'upstream/alpha' into alpha
dblythy 606ed96
Merge remote-tracking branch 'upstream/alpha' into alpha
dblythy 1e89817
Merge branch 'alpha' of https://github.com/dblythy/parse-server into …
dblythy 9720e8e
Merge remote-tracking branch 'upstream/alpha' into alpha
dblythy 7bc5c36
Merge remote-tracking branch 'upstream/alpha' into alpha
dblythy 7b2ab38
Merge remote-tracking branch 'upstream/alpha' into alpha
dblythy 3c8f5cc
Merge remote-tracking branch 'upstream/alpha' into alpha
dblythy 5814437
Merge remote-tracking branch 'upstream/alpha' into alpha
dblythy 986c6c2
Merge remote-tracking branch 'upstream/alpha' into alpha
dblythy 6a40dc4
Merge remote-tracking branch 'upstream/alpha' into alpha
dblythy a9fb355
Merge remote-tracking branch 'upstream/alpha' into alpha
dblythy 11fae79
new: reset password improve transparency
dblythy a5adbf7
add resetPasswordSuccessOnInvalidEmail
dblythy 08c417e
Update UsersRouter.js
dblythy 532ecd1
Update ValidationAndPasswordsReset.spec.js
dblythy 27e289a
add config check
dblythy fd335e3
Update ValidationAndPasswordsReset.spec.js
dblythy 1815923
refactor
dblythy ed15b95
Merge branch 'alpha' into forgotPassword
dblythy 4386152
Merge branch 'alpha' into forgotPassword
mtrezza 101211f
Update ValidationAndPasswordsReset.spec.js
dblythy 74db98e
Merge branch 'alpha' into forgotPassword
dblythy 5874552
Merge branch 'alpha' into forgotPassword
dblythy 1c00821
wip
dblythy 682e4e5
Merge branch 'forgotPassword' of https://github.com/dblythy/parse-ser…
dblythy aa9abc9
Merge branch 'alpha' into forgotPassword
mtrezza 93687bc
Merge branch 'alpha' into forgotPassword
mtrezza 1c67f00
Update src/Options/index.js
mtrezza 2115d36
Update src/Options/docs.js
mtrezza 1d77a97
Update src/Options/Definitions.js
mtrezza File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1082,4 +1082,43 @@ describe('Custom Pages, Email Verification, Password Reset', () => { | |
done(); | ||
}); | ||
}); | ||
|
||
it('should throw on an invalid reset password', async () => { | ||
await reconfigureServer({ | ||
appName: 'coolapp', | ||
publicServerURL: 'http://localhost:1337/1', | ||
emailAdapter: MockEmailAdapterWithOptions({ | ||
fromAddress: '[email protected]', | ||
apiKey: 'k', | ||
domain: 'd', | ||
}), | ||
passwordPolicy: { | ||
resetPasswordSuccessOnInvalidEmail: false, | ||
}, | ||
}); | ||
|
||
await expectAsync(Parse.User.requestPasswordReset('[email protected]')).toBeRejectedWith( | ||
new Parse.Error(Parse.Error.OBJECT_NOT_FOUND, 'A user with that email does not exist.') | ||
); | ||
}); | ||
|
||
it('validate resetPasswordSuccessonInvalidEmail', async () => { | ||
const invalidValues = [[], {}, 1, 'string']; | ||
for (const value of invalidValues) { | ||
await expectAsync( | ||
reconfigureServer({ | ||
appName: 'coolapp', | ||
publicServerURL: 'http://localhost:1337/1', | ||
emailAdapter: MockEmailAdapterWithOptions({ | ||
fromAddress: '[email protected]', | ||
apiKey: 'k', | ||
domain: 'd', | ||
}), | ||
passwordPolicy: { | ||
resetPasswordSuccessOnInvalidEmail: value, | ||
}, | ||
}) | ||
).toBeRejectedWith('resetPasswordSuccessOnInvalidEmail must be a boolean value'); | ||
} | ||
}); | ||
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.