0

Please or Register to create posts and topics.

QuickApp.Pro IdentityServer4 Email Login

While using identityserver4, logging in as an email isn't working.  I have to use the user in order to do so.  How can I fix this?  Also, I'm using the kitchen-sink for testing this.

I think I found it after stepping through after getting the github projects for the IdentityServer projects.  Looks like it is in the ValidateAsync in the public virtual async Task ValidateAsync(ResourceOwnerPasswordValidationContext context)
{
var user = await _userManager.FindByNameAsync(context.UserName);

 

Add this line to:

var user = await _userManager.FindByNameAsync(context.UserName);
// This is where I made the change in order to check both username and/or email
if (user == null)
{
user = await _userManager.FindByEmailAsync(context.UserName);
}