Skip to content
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

Usernamequeryfields not inspected on calling register function #361

Open
olawalejuwonm opened this issue Aug 12, 2022 · 0 comments · May be fixed by #362
Open

Usernamequeryfields not inspected on calling register function #361

olawalejuwonm opened this issue Aug 12, 2022 · 0 comments · May be fixed by #362

Comments

@olawalejuwonm
Copy link

I have my user model setup to allow either one or two fields (email and phoneNumber) as username (both can be provided) the order of priority is set to be email so i passed usernameField: 'email', and usernameQueryFields: ['userCode'], options. But on calling the register function with only phoneNumber, passport local mongoose throws missingUserName error because it only check for userNameField as shown in the snippet below:
image

It doesn't check for usernameQueryFields

@olawalejuwonm olawalejuwonm linked a pull request Aug 12, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant