feat: Add Parse Server option resetPasswordSuccessOnInvalidEmail to choose success or error response on password reset with invalid email (#7551)

This commit is contained in:
Daniel
2023-02-25 06:30:48 +11:00
committed by GitHub
parent 5477848518
commit e5d610e5e4
6 changed files with 73 additions and 16 deletions

View File

@@ -376,6 +376,13 @@ export class Config {
if (passwordPolicy.resetTokenReuseIfValid && !passwordPolicy.resetTokenValidityDuration) {
throw 'You cannot use resetTokenReuseIfValid without resetTokenValidityDuration';
}
if (
passwordPolicy.resetPasswordSuccessOnInvalidEmail &&
typeof passwordPolicy.resetPasswordSuccessOnInvalidEmail !== 'boolean'
) {
throw 'resetPasswordSuccessOnInvalidEmail must be a boolean value';
}
}
}