-
Notifications
You must be signed in to change notification settings - Fork 295
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
options.usernameQueryFields needs to be set to default empty array #357
Comments
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 |
In passport-local-mongoose/index.d.ts Line 63 in 60691ec
|
i am using the email as the username in my code, I also added the plugin into the schema as defined in the doc.
The login route is as below |
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: