Can the spring security call be configured to be able to authentication by email and username? Currently as I can see from the doc that userLookup.userDomainClassName is configured to match one field, saying username for example so user needs to input the username to login. Is is possible to enable user to login with email or username?
1
votes
1 Answers
5
votes
You can accomplish this by creating a Custom UserDetailsSerice.
In the implementation of loadUserByUsername search first by username, then if that fails, search by email.