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
When selectFields option is specified and limitAttempts is set to true, the wrong password authentication will failed with CAST error. This is because the attemptsField is not really selected by the query. When it tries to increment attempts by 1, that would always be (undefined+1)=>NaN which cannot be cast to a Number.
As hashField, the attemptsField is internally used by passport-local-mongoose. When it is necessary, passport-local-mongoose should add it to the selected fields like hashField and saltField. This should be a simple fix.
The text was updated successfully, but these errors were encountered:
When selectFields option is specified and limitAttempts is set to true, the wrong password authentication will failed with CAST error. This is because the attemptsField is not really selected by the query. When it tries to increment attempts by 1, that would always be (undefined+1)=>NaN which cannot be cast to a Number.
As hashField, the attemptsField is internally used by passport-local-mongoose. When it is necessary, passport-local-mongoose should add it to the selected fields like hashField and saltField. This should be a simple fix.
The text was updated successfully, but these errors were encountered: