The Ansopedia User Service is a backend service responsible for managing user accounts and authentication within the Ansopedia learning platform. It provides functionalities like authentication & authorization, profile management.
4
stars
1
forks
source link
Update Login API to Allow Users to Log In via Email or Username and Password #41
The current login API only allows users to authenticate using their email and password. To improve user flexibility, we need to update the API to support login using either email or username along with a password.
Tasks:
Update API Endpoint:
Modify the existing login API to accept both email and username as valid inputs for authentication.
Ensure that the input is validated to determine whether it is an email or a username.
Backend Logic:
Adjust the backend authentication logic to check the database for a matching record using either the email or username.
Error Handling:
Implement proper error handling for scenarios where the email/username or password is incorrect.
Provide meaningful error messages in the API response.
Testing:
Write unit and integration tests to validate the new login behaviour.
Documentation:
Update API documentation to reflect the new login functionality.
Include examples of API requests and responses for both email and username login scenarios.
Description:
The current login API only allows users to authenticate using their email and password. To improve user flexibility, we need to update the API to support login using either email or username along with a password.
Tasks:
Update API Endpoint:
Backend Logic:
Error Handling:
Testing:
Documentation: