Skip to content

Commit 03d477d

Browse files
committed
improved resetTokenReuseIfValid docs
1 parent 9839189 commit 03d477d

File tree

4 files changed

+7
-4
lines changed

4 files changed

+7
-4
lines changed

resources/buildConfigDefinitions.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ const nestedOptionTypes = [
1919
'FileUploadOptions',
2020
'CustomPagesOptions',
2121
'PagesCustomUrlsOptions',
22-
'PagesOptions'
22+
'PagesOptions',
2323
];
2424

2525
// The prefix of environment variables for nested options.

src/Options/Definitions.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -701,8 +701,10 @@ module.exports.PasswordPolicyOptions = {
701701
},
702702
resetTokenReuseIfValid: {
703703
env: 'PARSE_SERVER_PASSWORD_POLICY_RESET_TOKEN_REUSE_IF_VALID',
704-
help: "resend token if it's still valid",
704+
help:
705+
'Reuse password reset token if it has not expired; requires `resetTokenValidityDuration` to be set. Default is `false`.',
705706
action: parsers.booleanParser,
707+
default: false,
706708
},
707709
resetTokenValidityDuration: {
708710
env: 'PARSE_SERVER_PASSWORD_POLICY_RESET_TOKEN_VALIDITY_DURATION',

src/Options/docs.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@
162162
* @property {Boolean} doNotAllowUsername disallow username in passwords
163163
* @property {Number} maxPasswordAge days for password expiry
164164
* @property {Number} maxPasswordHistory setting to prevent reuse of previous n passwords
165-
* @property {Boolean} resetTokenReuseIfValid resend token if it's still valid
165+
* @property {Boolean} resetTokenReuseIfValid Reuse password reset token if it has not expired; requires `resetTokenValidityDuration` to be set. Default is `false`.
166166
* @property {Number} resetTokenValidityDuration time for token to expire
167167
* @property {Function} validatorCallback a callback function to be invoked to validate the password
168168
* @property {String} validatorPattern a RegExp object or a regex string representing the pattern to enforce

src/Options/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,8 @@ export interface PasswordPolicyOptions {
374374
maxPasswordHistory: ?number;
375375
/* time for token to expire */
376376
resetTokenValidityDuration: ?number;
377-
/* resend token if it's still valid */
377+
/* Reuse password reset token if it has not expired; requires `resetTokenValidityDuration` to be set. Default is `false`.
378+
:DEFAULT: false */
378379
resetTokenReuseIfValid: ?boolean;
379380
}
380381

0 commit comments

Comments
 (0)