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 the option 'usernameQueryFields' is specified by the user, the following error occurs:
…/passport-local-mongoose/index.js:36
options.usernameQueryFields.push(options.usernameField);
TypeError: options.usernameQueryFields.push is not a function
This should be solved by initiating options.usernameQueryFields in index.js as such:
options.usernameQueryFields = [];
The text was updated successfully, but these errors were encountered:
As option usernameQueryFields should be provided as an array or in case not provided is prepopulated as an array I don't see the issue here. Perhaps a type check for isArray after line 35 would make sense to prevent problems
i am using the email as the username in my code, I also added the plugin into the schema as defined in the doc.
I am trying to authenticate, but its not working.
Its doing the redirecting to the failed route define in the redirect.
When the option 'usernameQueryFields' is specified by the user, the following error occurs:
This should be solved by initiating options.usernameQueryFields in index.js as such:
options.usernameQueryFields = [];
The text was updated successfully, but these errors were encountered: