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

[MissingUsernameError] No username was given #377

Open
adityad12 opened this issue Aug 9, 2023 · 1 comment
Open

[MissingUsernameError] No username was given #377

adityad12 opened this issue Aug 9, 2023 · 1 comment

Comments

@adityad12
Copy link

**const User = mongoose.model('Users', UserSchema);

User.register({username:'username', active: false}, 'password', function(err, user) {
if (err) { ... }

const authenticate = User.authenticate();
authenticate('username', 'password', function(err, result) {
if (err) { ... }

// Value 'result' is set to false. The user could not be authenticated since the user is not active

});
});** This belongs to the README

After implementing this error is returned which tells the username was not given, even after giving an username as an input

@adityad12
Copy link
Author

I am sorry if this is a silly issue and if it has a silly answer, I tried and searched for a long time and did not get any satisfactory answer.

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

No branches or pull requests

1 participant