I have a user in database with following credentials:
{
"_id": "zTHv8yqPSm3pmi4So",
"emails": [{"address": "someemail@example.com", "verified": true}],
"username": "someusername",
"profile": {
"firstName": "Example",
"lastName": "User",
}
}
When I try to login user with username it says user not found:
Meteor.loginWithPassword("someusername", "123456", function(error){
console.log(error.reason);
});
It works fine for email but not for username.
I want flexibility to login user with either of email or username