As a user, I want to be able to log in using either my username or my email address in the same form field so that I have a more flexible and convenient login experience.
Description
Currently, the login functionality only allows users to enter their username to log in. To improve user experience, the login form should accept either a username or an email address in the same input field. This change will allow users to choose the method they find most convenient and familiar.
Acceptance Criteria
[ ] The login form should contain a single input field where the user can enter either their username or email address.
[ ] The backend should detect if the input is an email or a username and authenticate accordingly.
[ ] If the entered email/username does not exist or the password is incorrect, an appropriate error message should be displayed.
[ ] Both username and email inputs should be case-insensitive for login.
[ ] Successful login redirects the user to the home page/dashboard.
Additional Notes
Enhance the UserService to add a method that can handle authentication with either a username or an email.
The frontend should provide clear instructions on the login form to inform users they can enter either their email or username.
The backend should prioritize security to prevent any vulnerabilities related to email and username handling.
User Story: Login with Username or Email
Title
As a user, I want to be able to log in using either my username or my email address in the same form field so that I have a more flexible and convenient login experience.
Description
Currently, the login functionality only allows users to enter their username to log in. To improve user experience, the login form should accept either a username or an email address in the same input field. This change will allow users to choose the method they find most convenient and familiar.
Acceptance Criteria
Additional Notes
UserService
to add a method that can handle authentication with either a username or an email.Priority
High
Effort Estimate
Medium