I am using the ASP.NET identity but I would like to validate the user with different fields instead of using the email (or username) and the password.
In my scenario the user has a keycode instead of the email. That keycode field I know how to add to the IdentityUser through the ApplicationUser but I found trouble when I need to check if it exists in the database. The UserManager has methods to find the user by username and password (or email) but not for the custom properties I added (obviously).
I tried to implement my own UserManager but it seemed such a big effort for quite "simple" thing. I just need one extra method.
One solution is using the username as the field to store the keycode. However I don't like the idea very much. It is not very clean, feels like cheating; and I may need that field in the future for its original purpose.
Is a solution with a better a trade-off between complexity and clean solution?
Thank you very much in advance!