You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add boolean option 'ambiguousErrorMessages' to Accounts config that sends ambiguous error messages to the client in order to mitigate user enumeration. User enumeration still possible via inference upon registration failure, but at least we’re not being as explicit about the failures.
Copy file name to clipboardExpand all lines: packages/accounts-base/accounts_common.js
+6-1Lines changed: 6 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -86,6 +86,9 @@ export class AccountsCommon {
86
86
// - passwordResetTokenExpirationInDays {Number}
87
87
// Number of days since password reset token creation until the
88
88
// token cannt be used any longer (password reset token expires).
89
+
// - ambiguousErrorMessages {Boolean}
90
+
// Return ambiguous error messages from login failures to prevent
91
+
// user enumeration.
89
92
90
93
/**
91
94
* @summary Set global accounts options.
@@ -98,6 +101,7 @@ export class AccountsCommon {
98
101
* @param {String} options.oauthSecretKey When using the `oauth-encryption` package, the 16 byte key using to encrypt sensitive account credentials in the database, encoded in base64. This option may only be specifed on the server. See packages/oauth-encryption/README.md for details.
99
102
* @param {Number} options.passwordResetTokenExpirationInDays The number of days from when a link to reset password is sent until token expires and user can't reset password with the link anymore. Defaults to 3.
100
103
* @param {Number} options.passwordEnrollTokenExpirationInDays The number of days from when a link to set inital password is sent until token expires and user can't set password with the link anymore. Defaults to 30.
104
+
* @param {Boolean} options.ambiguousErrorMessages Return ambiguous error messages from login failures to prevent user enumeration. Defaults to false.
0 commit comments