Skip to content

Commit d5dcf89

Browse files
committed
improved resetTokenValidityDuration docs
1 parent 03d477d commit d5dcf89

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

src/Options/Definitions.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -702,13 +702,14 @@ module.exports.PasswordPolicyOptions = {
702702
resetTokenReuseIfValid: {
703703
env: 'PARSE_SERVER_PASSWORD_POLICY_RESET_TOKEN_REUSE_IF_VALID',
704704
help:
705-
'Reuse password reset token if it has not expired; requires `resetTokenValidityDuration` to be set. Default is `false`.',
705+
'Is true if the password reset token should be reused if it has not expired; requires `resetTokenValidityDuration` to be set. Default is `false`.',
706706
action: parsers.booleanParser,
707707
default: false,
708708
},
709709
resetTokenValidityDuration: {
710710
env: 'PARSE_SERVER_PASSWORD_POLICY_RESET_TOKEN_VALIDITY_DURATION',
711-
help: 'time for token to expire',
711+
help:
712+
'The time duration in seconds after which a password reset token expires and becomes invalid. Default is indefinite (never expires).',
712713
action: parsers.numberParser('resetTokenValidityDuration'),
713714
},
714715
validatorCallback: {

src/Options/docs.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,8 +162,8 @@
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 Reuse password reset token if it has not expired; requires `resetTokenValidityDuration` to be set. Default is `false`.
166-
* @property {Number} resetTokenValidityDuration time for token to expire
165+
* @property {Boolean} resetTokenReuseIfValid Is true if the password reset token should be reused if it has not expired; requires `resetTokenValidityDuration` to be set. Default is `false`.
166+
* @property {Number} resetTokenValidityDuration The time duration in seconds after which a password reset token expires and becomes invalid. Default is indefinite (never expires).
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
169169
*/

src/Options/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -372,9 +372,9 @@ export interface PasswordPolicyOptions {
372372
maxPasswordAge: ?number;
373373
/* setting to prevent reuse of previous n passwords */
374374
maxPasswordHistory: ?number;
375-
/* time for token to expire */
375+
/* The time duration in seconds after which a password reset token expires and becomes invalid. Default is indefinite (never expires). */
376376
resetTokenValidityDuration: ?number;
377-
/* Reuse password reset token if it has not expired; requires `resetTokenValidityDuration` to be set. Default is `false`.
377+
/* Is true if the password reset token should be reused if it has not expired; requires `resetTokenValidityDuration` to be set. Default is `false`.
378378
:DEFAULT: false */
379379
resetTokenReuseIfValid: ?boolean;
380380
}

0 commit comments

Comments
 (0)